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
Constructors Constructor Description DelegatingPlacementPluginFactory(PlacementPluginFactory<?> defaultPlacementPluginFactory)Constructor.
-
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.PlacementPluginConfiggetConfig()Return the configuration of the plugin.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
-
-
-
-
Constructor Detail
-
DelegatingPlacementPluginFactory
public DelegatingPlacementPluginFactory(PlacementPluginFactory<?> defaultPlacementPluginFactory)
Constructor.- Parameters:
defaultPlacementPluginFactory- APlacementPluginFactoryto use when no delegate is defined.
-
-
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).- Specified by:
createPluginInstancein interfacePlacementPluginFactory<PlacementPluginConfig>
-
getConfig
public PlacementPluginConfig getConfig()
Description copied from interface:PlacementPluginFactoryReturn the configuration of the plugin. Default implementation returns null.- Specified by:
getConfigin interfacePlacementPluginFactory<PlacementPluginConfig>
-
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()
-
-