public class InternalClusterService extends AbstractLifecycleComponent<ClusterService> implements ClusterService
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static String |
SETTING_CLUSTER_SERVICE_RECONNECT_INTERVAL |
static String |
SETTING_CLUSTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD |
static String |
UPDATE_THREAD_NAME |
lifecycledeprecationLogger, logger, settings| コンストラクタと説明 |
|---|
InternalClusterService(Settings settings,
DiscoveryService discoveryService,
OperationRouting operationRouting,
TransportService transportService,
NodeSettingsService nodeSettingsService,
ThreadPool threadPool,
ClusterName clusterName,
DiscoveryNodeService discoveryNodeService,
Version version) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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. is
in state
ClusterState.ClusterStateStatus.APPLIED
NOTE: a null timeout means that the listener will never be removed
automatically |
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.
|
boolean |
assertClusterStateThread()
asserts that the current thread is the cluster state update thread
|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
TimeValue |
getMaxTaskWaitTime()
Returns the maximum wait time for tasks in the queue
|
TaskManager |
getTaskManager()
Returns task manager created in the cluster service
|
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 cluster state update task; unlike
ClusterService.submitStateUpdateTask(String, Object, ClusterStateTaskConfig, ClusterStateTaskExecutor, ClusterStateTaskListener),
submitted updates will not be batched. |
<T> void |
submitStateUpdateTask(String source,
T task,
ClusterStateTaskConfig config,
ClusterStateTaskExecutor<T> executor,
ClusterStateTaskListener listener)
Submits a cluster state update task; submitted updates will be
batched across the same instance of executor.
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stoplogDeprecatedSetting, logRemovedSetting, nodeNameclone, 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
@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 IllegalStateException
ClusterServiceaddInitialStateBlock インタフェース内 ClusterServiceIllegalStateExceptionpublic void removeInitialStateBlock(ClusterBlock block) throws IllegalStateException
ClusterServiceremoveInitialStateBlock インタフェース内 ClusterServiceIllegalStateExceptionprotected void doStart()
doStart クラス内 AbstractLifecycleComponent<ClusterService>protected void doStop()
doStop クラス内 AbstractLifecycleComponent<ClusterService>protected void doClose()
doClose クラス内 AbstractLifecycleComponent<ClusterService>public DiscoveryNode localNode()
ClusterServicelocalNode インタフェース内 ClusterServicepublic OperationRouting operationRouting()
ClusterServiceoperationRouting インタフェース内 ClusterServicepublic ClusterState state()
ClusterServicestate インタフェース内 ClusterServicepublic void addFirst(ClusterStateListener listener)
ClusterServiceaddFirst インタフェース内 ClusterServicepublic void addLast(ClusterStateListener listener)
ClusterServiceaddLast インタフェース内 ClusterServicepublic void add(ClusterStateListener listener)
ClusterServiceadd インタフェース内 ClusterServicepublic void remove(ClusterStateListener listener)
ClusterServiceremove インタフェース内 ClusterServicepublic void add(LocalNodeMasterListener listener)
ClusterServiceadd インタフェース内 ClusterServicepublic void remove(LocalNodeMasterListener listener)
ClusterServiceremove インタフェース内 ClusterServicepublic void add(@Nullable TimeValue timeout, TimeoutClusterStateListener listener)
ClusterServiceClusterState.ClusterStateStatus.APPLIED
NOTE: a null timeout means that the listener will never be removed
automaticallyadd インタフェース内 ClusterServicepublic void submitStateUpdateTask(String source, ClusterStateUpdateTask updateTask)
ClusterServiceClusterService.submitStateUpdateTask(String, Object, ClusterStateTaskConfig, ClusterStateTaskExecutor, ClusterStateTaskListener),
submitted updates will not be batched.submitStateUpdateTask インタフェース内 ClusterServicesource - the source of the cluster state update taskupdateTask - the full context for the cluster state update
taskpublic <T> void submitStateUpdateTask(String source, T task, ClusterStateTaskConfig config, ClusterStateTaskExecutor<T> executor, ClusterStateTaskListener listener)
ClusterServicesubmitStateUpdateTask インタフェース内 ClusterServiceT - the type of the cluster state update task statesource - the source of the cluster state update tasktask - the state needed for the cluster state update taskconfig - the cluster state update task configurationexecutor - the cluster state update task executor; tasks
that share the same executor will be executed
batches on this executorlistener - callback after the cluster state update task
completespublic List<PendingClusterTask> pendingTasks()
ClusterServicependingTasks インタフェース内 ClusterServicepublic int numberOfPendingTasks()
ClusterServicenumberOfPendingTasks インタフェース内 ClusterServicepublic TimeValue getMaxTaskWaitTime()
ClusterServicegetMaxTaskWaitTime インタフェース内 ClusterServicepublic TaskManager getTaskManager()
ClusterServicegetTaskManager インタフェース内 ClusterServicepublic boolean assertClusterStateThread()
Copyright © 2009–2016. All rights reserved.