Class DelegatingPlacementPluginFactory
- java.lang.Object
-
- org.apache.solr.cluster.placement.impl.DelegatingPlacementPluginFactory
-
- All Implemented Interfaces:
ConfigurablePlugin<PlacementPluginFactory.NoConfig>,PlacementPluginFactory<PlacementPluginFactory.NoConfig>
public final class DelegatingPlacementPluginFactory extends Object implements PlacementPluginFactory<PlacementPluginFactory.NoConfig>
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
Constructors Constructor Description DelegatingPlacementPluginFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlacementPlugincreatePluginInstance()Returns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement.PlacementPluginFactory<? extends PlacementPluginConfig>getDelegate()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, wait
-
Methods inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
configure, getConfig
-
-
-
-
Method Detail
-
createPluginInstance
public PlacementPlugin 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).If this method returns null then a simple default assignment strategy will be used (see
SimplePlacementFactory).- Specified by:
createPluginInstancein interfacePlacementPluginFactory<PlacementPluginFactory.NoConfig>
-
setDelegationPhaser
public void setDelegationPhaser(Phaser phaser)
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
public void setDelegate(PlacementPluginFactory<? extends PlacementPluginConfig> delegate)
-
getDelegate
public PlacementPluginFactory<? extends PlacementPluginConfig> getDelegate()
-
-