Class DelegatingPlacementPluginFactory
java.lang.Object
org.apache.solr.cluster.placement.impl.DelegatingPlacementPluginFactory
- All Implemented Interfaces:
ConfigurablePlugin<PlacementPluginConfig>,PlacementPluginFactory<PlacementPluginConfig>
public final class DelegatingPlacementPluginFactory
extends Object
implements PlacementPluginFactory<PlacementPluginConfig>
Helper class to support dynamic reloading of plugin implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
PlacementPluginFactory.NoConfig -
Field Summary
Fields inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
PLUGIN_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingPlacementPluginFactory(PlacementPluginFactory<?> defaultPlacementPluginFactory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement.Return the configuration of the plugin.PlacementPluginFactory<? extends PlacementPluginConfig> voidsetDelegate(PlacementPluginFactory<? extends PlacementPluginConfig> delegate) voidsetDelegationPhaser(Phaser phaser) A phaser that will advance phases every timesetDelegate(PlacementPluginFactory)is called.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
configure
-
Constructor Details
-
DelegatingPlacementPluginFactory
Constructor.- Parameters:
defaultPlacementPluginFactory- APlacementPluginFactoryto use when no delegate is defined.
-
-
Method Details
-
createPluginInstance
Description copied from interface:PlacementPluginFactoryReturns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement. Multiple instances of a plugin can be used in parallel (for example if configuration has to change, but plugin instances with the previous configuration are still being used).- Specified by:
createPluginInstancein interfacePlacementPluginFactory<PlacementPluginConfig>
-
getConfig
Description copied from interface:PlacementPluginFactoryReturn the configuration of the plugin. Default implementation returns null.- Specified by:
getConfigin interfacePlacementPluginFactory<PlacementPluginConfig>
-
setDelegationPhaser
A phaser that will advance phases every timesetDelegate(PlacementPluginFactory)is called. Useful for allowing tests to know when a new delegate is finished getting set. -
setDelegate
-
getDelegate
-