public class InternalClusterService extends AbstractLifecycleComponent<ClusterService> implements ClusterService
| Modifier and Type | Field and Description |
|---|---|
static String |
SETTING_CLUSTER_SERVICE_RECONNECT_INTERVAL |
static String |
SETTING_CLUSTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD |
static String |
UPDATE_THREAD_NAME |
lifecyclecomponentSettings, logger, settings| Constructor and Description |
|---|
InternalClusterService(Settings settings,
DiscoveryService discoveryService,
OperationRouting operationRouting,
TransportService transportService,
NodeSettingsService nodeSettingsService,
ThreadPool threadPool,
ClusterName clusterName,
DiscoveryNodeService discoveryNodeService,
Version version) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ClusterStateListener listener)
Adds a listener for updated cluster states.
|
void |
add(LocalNodeMasterListener listener)
Add a listener for on/off local node master events
|
void |
add(TimeValue timeout,
TimeoutClusterStateListener listener)
Adds a cluster state listener that will timeout after the provided timeout,
and is executed after the clusterstate has been successfully applied ie.
|
void |
addFirst(ClusterStateListener listener)
Adds a priority listener for updated cluster states.
|
void |
addInitialStateBlock(ClusterBlock block)
Adds an initial block to be set on the first cluster state created.
|
void |
addLast(ClusterStateListener listener)
Adds last listener.
|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
DiscoveryNode |
localNode()
The local node.
|
int |
numberOfPendingTasks()
Returns the number of currently pending tasks.
|
OperationRouting |
operationRouting()
The operation routing.
|
List<PendingClusterTask> |
pendingTasks()
Returns the tasks that are pending.
|
void |
remove(ClusterStateListener listener)
Removes a listener for updated cluster states.
|
void |
remove(LocalNodeMasterListener listener)
Remove the given listener for on/off local master events
|
void |
removeInitialStateBlock(ClusterBlock block)
Remove an initial block to be set on the first cluster state created.
|
NodeSettingsService |
settingsService() |
ClusterState |
state()
The current state.
|
void |
submitStateUpdateTask(String source,
ClusterStateUpdateTask updateTask)
Submits a task that will update the cluster state (the task has a default priority of
Priority.NORMAL). |
void |
submitStateUpdateTask(String source,
Priority priority,
ClusterStateUpdateTask updateTask)
Submits a task that will update the cluster state.
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopnodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final String SETTING_CLUSTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD
public static final String SETTING_CLUSTER_SERVICE_RECONNECT_INTERVAL
public static final String UPDATE_THREAD_NAME
@Inject public InternalClusterService(Settings settings, DiscoveryService discoveryService, OperationRouting operationRouting, TransportService transportService, NodeSettingsService nodeSettingsService, ThreadPool threadPool, ClusterName clusterName, DiscoveryNodeService discoveryNodeService, Version version)
public NodeSettingsService settingsService()
public void addInitialStateBlock(ClusterBlock block) throws ElasticsearchIllegalStateException
ClusterServiceaddInitialStateBlock in interface ClusterServiceElasticsearchIllegalStateExceptionpublic void removeInitialStateBlock(ClusterBlock block) throws ElasticsearchIllegalStateException
ClusterServiceremoveInitialStateBlock in interface ClusterServiceElasticsearchIllegalStateExceptionprotected void doStart()
throws ElasticsearchException
doStart in class AbstractLifecycleComponent<ClusterService>ElasticsearchExceptionprotected void doStop()
throws ElasticsearchException
doStop in class AbstractLifecycleComponent<ClusterService>ElasticsearchExceptionprotected void doClose()
throws ElasticsearchException
doClose in class AbstractLifecycleComponent<ClusterService>ElasticsearchExceptionpublic DiscoveryNode localNode()
ClusterServicelocalNode in interface ClusterServicepublic OperationRouting operationRouting()
ClusterServiceoperationRouting in interface ClusterServicepublic ClusterState state()
ClusterServicestate in interface ClusterServicepublic void addFirst(ClusterStateListener listener)
ClusterServiceaddFirst in interface ClusterServicepublic void addLast(ClusterStateListener listener)
ClusterServiceaddLast in interface ClusterServicepublic void add(ClusterStateListener listener)
ClusterServiceadd in interface ClusterServicepublic void remove(ClusterStateListener listener)
ClusterServiceremove in interface ClusterServicepublic void add(LocalNodeMasterListener listener)
ClusterServiceadd in interface ClusterServicepublic void remove(LocalNodeMasterListener listener)
ClusterServiceremove in interface ClusterServicepublic void add(TimeValue timeout, TimeoutClusterStateListener listener)
ClusterServiceClusterState.ClusterStateStatus.APPLIEDadd in interface ClusterServicepublic void submitStateUpdateTask(String source, ClusterStateUpdateTask updateTask)
ClusterServicePriority.NORMAL).submitStateUpdateTask in interface ClusterServicepublic void submitStateUpdateTask(String source, Priority priority, ClusterStateUpdateTask updateTask)
ClusterServicesubmitStateUpdateTask in interface ClusterServicepublic List<PendingClusterTask> pendingTasks()
ClusterServicependingTasks in interface ClusterServicepublic int numberOfPendingTasks()
ClusterServicenumberOfPendingTasks in interface ClusterServiceCopyright © 2009–2016. All rights reserved.