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
ARoutingService
listens to clusters state. When this service receives aClusterChangedEvent
the cluster state will be verified and the routing tables might be updated.Note: The
RoutingService
is 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.AbstractLifecycleComponent
lifecycle
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
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 void
doClose()
protected void
doStart()
protected void
doStop()
protected void
performReroute(java.lang.String reason)
void
reroute(java.lang.String reason)
Initiates a reroute.-
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
-
-
-
-
Constructor Detail
-
RoutingService
@Inject public RoutingService(Settings settings, ClusterService clusterService, AllocationService allocationService)
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStart
in classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClose
in classAbstractLifecycleComponent
-
reroute
public final void reroute(java.lang.String reason)
Initiates a reroute.
-
performReroute
protected void performReroute(java.lang.String reason)
-
-