Package org.elasticsearch.plugins
Interface ClusterPlugin
public interface ClusterPlugin
An extension point for
Plugin implementations to customer behavior of cluster management.-
Method Summary
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<ShardsAllocator>>getShardsAllocators(Settings settings, ClusterSettings clusterSettings)ReturnShardsAllocatorimplementations added by this plugin.default voidonNodeStarted()Called when the node is started
-
Method Details
-
createAllocationDeciders
default java.util.Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings)Return deciders used to customize where shards are allocated.- Parameters:
settings- Settings for the nodeclusterSettings- Settings for the cluster- Returns:
- Custom
AllocationDeciderinstances
-
getShardsAllocators
default java.util.Map<java.lang.String,java.util.function.Supplier<ShardsAllocator>> getShardsAllocators(Settings settings, ClusterSettings clusterSettings)ReturnShardsAllocatorimplementations added by this plugin. The key of the returnedMapis the name of the allocator, and the value is a function to construct the allocator.- Parameters:
settings- Settings for the nodeclusterSettings- Settings for the cluster- Returns:
- A map of allocator implementations
-
onNodeStarted
default void onNodeStarted()Called when the node is started
-