public class RoutingService extends AbstractLifecycleComponent<RoutingService> implements ClusterStateListener
RoutingService listens to clusters state. When this service
receives a ClusterChangedEvent 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.
lifecyclecomponentSettings, logger, settings| Constructor and Description |
|---|
RoutingService(Settings settings,
ThreadPool threadPool,
ClusterService clusterService,
AllocationService allocationService) |
| Modifier and Type | Method and Description |
|---|---|
void |
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.
|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
void |
scheduleReroute()
make sure that a reroute will be done by the next scheduled check
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopnodeName@Inject public RoutingService(Settings settings, ThreadPool threadPool, ClusterService clusterService, AllocationService allocationService)
protected void doStart()
throws ElasticsearchException
doStart in class AbstractLifecycleComponent<RoutingService>ElasticsearchExceptionprotected void doStop()
throws ElasticsearchException
doStop in class AbstractLifecycleComponent<RoutingService>ElasticsearchExceptionprotected void doClose()
throws ElasticsearchException
doClose in class AbstractLifecycleComponent<RoutingService>ElasticsearchExceptionpublic void scheduleReroute()
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListenerclusterChanged in interface ClusterStateListenerCopyright © 2009–2015. All rights reserved.