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 StringBALANCED_ALLOCATORstatic Setting<String>SHARDS_ALLOCATOR_TYPE_SETTING
-
Constructor Summary
Constructors Constructor Description ClusterModule(Settings settings, ClusterService clusterService, List<ClusterPlugin> clusterPlugins, ClusterInfoService clusterInfoService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure()Configures aBindervia the exposed methods.static Collection<AllocationDecider>createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, 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()static List<NamedWriteableRegistry.Entry>getNamedWriteables()static List<NamedXContentRegistry.Entry>getNamedXWriteables()-
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, requireBinding
-
-
-
-
Field Detail
-
BALANCED_ALLOCATOR
public static final String BALANCED_ALLOCATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClusterModule
public ClusterModule(Settings settings, ClusterService clusterService, List<ClusterPlugin> clusterPlugins, ClusterInfoService clusterInfoService)
-
-
Method Detail
-
getNamedWriteables
public static List<NamedWriteableRegistry.Entry> getNamedWriteables()
-
filterCustomsForPre63Clients
public static ClusterState filterCustomsForPre63Clients(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 deserialize- Parameters:
clusterState- the cluster state to filter the customs from- Returns:
- the adapted cluster state
-
getNamedXWriteables
public static List<NamedXContentRegistry.Entry> getNamedXWriteables()
-
getIndexNameExpressionResolver
public IndexNameExpressionResolver getIndexNameExpressionResolver()
-
createAllocationDeciders
public static Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, List<ClusterPlugin> clusterPlugins)
Return a newAllocationDeciderinstance with builtin deciders as well as those from plugins.
-
getAllocationService
public AllocationService getAllocationService()
-
configure
protected void configure()
Description copied from class:AbstractModuleConfigures aBindervia the exposed methods.- Specified by:
configurein classAbstractModule
-
-