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 TypeMethodDescriptiondefault Collection<AllocationDecider>
createAllocationDeciders
(Settings settings, ClusterSettings clusterSettings) Return deciders used to customize where shards are allocated.default Map<String,
ExistingShardsAllocator> ReturnExistingShardsAllocator
implementations added by this plugin; the index settingExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTING
sets the key of the allocator to use to allocate its shards.default Map<String,
Supplier<ShardsAllocator>> getShardsAllocators
(Settings settings, ClusterSettings clusterSettings) ReturnShardsAllocator
implementations added by this plugin.default void
Called when the node is started
-
Method Details
-
createAllocationDeciders
default 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
AllocationDecider
instances
-
getShardsAllocators
default Map<String,Supplier<ShardsAllocator>> getShardsAllocators(Settings settings, ClusterSettings clusterSettings) ReturnShardsAllocator
implementations added by this plugin. The key of the returnedMap
is 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
-
getExistingShardsAllocators
ReturnExistingShardsAllocator
implementations added by this plugin; the index settingExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTING
sets the key of the allocator to use to allocate its shards. The default allocator isGatewayAllocator
. -
onNodeStarted
default void onNodeStarted()Called when the node is started
-