Class RoutingService
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.common.component.AbstractLifecycleComponent
-
- org.elasticsearch.cluster.routing.RoutingService
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable
public class RoutingService extends AbstractLifecycleComponent
ARoutingServicelistens to clusters state. When this service receives aClusterChangedEventthe cluster state will be verified and the routing tables might be updated.Note: The
RoutingServiceis responsible for cluster wide operations that include modifications to the cluster state. Such an operation can only be performed on the clusters master node. Unless the local node this service is running on is the clusters master node this service will not perform any actions.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description RoutingService(Settings settings, ClusterService clusterService, AllocationService allocationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoClose()protected voiddoStart()protected voiddoStop()protected voidperformReroute(java.lang.String reason)voidreroute(java.lang.String reason)Initiates a reroute.-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
-
-
-
Constructor Detail
-
RoutingService
@Inject public RoutingService(Settings settings, ClusterService clusterService, AllocationService allocationService)
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStartin classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClosein classAbstractLifecycleComponent
-
reroute
public final void reroute(java.lang.String reason)
Initiates a reroute.
-
performReroute
protected void performReroute(java.lang.String reason)
-
-