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.
lifecycle
deprecationLogger, 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() |
AllocationService |
getAllocationService() |
protected void |
performReroute(String reason) |
void |
reroute(String reason)
Initiates a reroute.
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
logDeprecatedSetting, logRemovedSetting, nodeName
@Inject public RoutingService(Settings settings, ThreadPool threadPool, ClusterService clusterService, AllocationService allocationService)
protected void doStart()
doStart
in class AbstractLifecycleComponent<RoutingService>
protected void doStop()
doStop
in class AbstractLifecycleComponent<RoutingService>
protected void doClose()
doClose
in class AbstractLifecycleComponent<RoutingService>
public AllocationService getAllocationService()
public final void reroute(String reason)
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListener
clusterChanged
in interface ClusterStateListener
protected void performReroute(String reason)
Copyright © 2009–2016. All rights reserved.