public interface ClusterPlugin
Plugin
implementations to customer behavior of cluster management.Modifier and Type | Method | Description |
---|---|---|
default java.util.Collection<AllocationDecider> |
createAllocationDeciders(Settings settings,
ClusterSettings clusterSettings) |
Return deciders used to customize where shards are allocated.
|
default java.util.Map<java.lang.String,java.util.function.Supplier<ClusterState.Custom>> |
getInitialClusterStateCustomSupplier() |
Returns a map of
ClusterState.Custom supplier that should be invoked to initialize the initial clusterstate. |
default java.util.Map<java.lang.String,java.util.function.Supplier<ShardsAllocator>> |
getShardsAllocators(Settings settings,
ClusterSettings clusterSettings) |
Return
ShardsAllocator implementations added by this plugin. |
default void |
onNodeStarted() |
Called when the node is started
|
default java.util.Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings)
settings
- Settings for the nodeclusterSettings
- Settings for the clusterAllocationDecider
instancesdefault java.util.Map<java.lang.String,java.util.function.Supplier<ShardsAllocator>> getShardsAllocators(Settings settings, ClusterSettings clusterSettings)
ShardsAllocator
implementations added by this plugin.
The key of the returned Map
is the name of the allocator, and the value
is a function to construct the allocator.settings
- Settings for the nodeclusterSettings
- Settings for the clusterdefault void onNodeStarted()
default java.util.Map<java.lang.String,java.util.function.Supplier<ClusterState.Custom>> getInitialClusterStateCustomSupplier()
ClusterState.Custom
supplier that should be invoked to initialize the initial clusterstate.
This allows custom clusterstate extensions to be always present and prevents invariants where clusterstates are published
but customs are not initialized.
TODO: Remove this whole concept of InitialClusterStateCustomSupplier, it's not used anymore