Package org.elasticsearch.cluster
Class ClusterModule
java.lang.Object
org.elasticsearch.common.inject.AbstractModule
org.elasticsearch.cluster.ClusterModule
- All Implemented Interfaces:
Module
public class ClusterModule extends AbstractModule
Configures classes and services that affect the entire cluster.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBALANCED_ALLOCATORstatic Setting<java.lang.String>SHARDS_ALLOCATOR_TYPE_SETTING -
Constructor Summary
Constructors Constructor Description ClusterModule(Settings settings, ClusterService clusterService, java.util.List<ClusterPlugin> clusterPlugins, ClusterInfoService clusterInfoService, SnapshotsInfoService snapshotsInfoService, ThreadContext threadContext) -
Method Summary
Modifier and Type Method Description protected voidconfigure()Configures aBindervia the exposed methods.static java.util.Collection<AllocationDecider>createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, java.util.List<ClusterPlugin> clusterPlugins)Return a newAllocationDeciderinstance with builtin deciders as well as those from plugins.static ClusterStatefilterCustomsForPre63Clients(ClusterState clusterState)For interoperability with transport clients older than 6.3, we need to strip customs from the cluster state that the client might not be able to deserializeAllocationServicegetAllocationService()IndexNameExpressionResolvergetIndexNameExpressionResolver()MetadataDeleteIndexServicegetMetadataDeleteIndexService()static java.util.List<NamedWriteableRegistry.Entry>getNamedWriteables()static java.util.List<org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry>getNamedXWriteables()voidsetExistingShardsAllocators(GatewayAllocator gatewayAllocator)Methods inherited from class org.elasticsearch.common.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
BALANCED_ALLOCATOR
public static final java.lang.String BALANCED_ALLOCATOR- See Also:
- Constant Field Values
-
SHARDS_ALLOCATOR_TYPE_SETTING
-
-
Constructor Details
-
ClusterModule
public ClusterModule(Settings settings, ClusterService clusterService, java.util.List<ClusterPlugin> clusterPlugins, ClusterInfoService clusterInfoService, SnapshotsInfoService snapshotsInfoService, ThreadContext threadContext)
-
-
Method Details
-
getNamedWriteables
-
filterCustomsForPre63Clients
For interoperability with transport clients older than 6.3, we need to strip customs from the cluster state that the client might not be able to deserialize- Parameters:
clusterState- the cluster state to filter the customs from- Returns:
- the adapted cluster state
-
getNamedXWriteables
public static java.util.List<org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry> getNamedXWriteables() -
getIndexNameExpressionResolver
-
createAllocationDeciders
public static java.util.Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, java.util.List<ClusterPlugin> clusterPlugins)Return a newAllocationDeciderinstance with builtin deciders as well as those from plugins. -
getAllocationService
-
getMetadataDeleteIndexService
-
configure
protected void configure()Description copied from class:AbstractModuleConfigures aBindervia the exposed methods.- Specified by:
configurein classAbstractModule
-
setExistingShardsAllocators
-