public abstract class AckedClusterStateUpdateTask<Response> extends TimeoutClusterStateUpdateTask
ClusterStateUpdateTask that allows to be notified when
all the nodes have acknowledged a cluster state update request| Modifier | Constructor and Description |
|---|---|
protected |
AckedClusterStateUpdateTask(AckedRequest request,
ActionListener<Response> listener) |
| Modifier and Type | Method and Description |
|---|---|
TimeValue |
ackTimeout()
Acknowledgement timeout, maximum time interval to wait for acknowledgements
|
void |
clusterStateProcessed(String source,
ClusterState oldState,
ClusterState newState)
Called when the result of the
ClusterStateUpdateTask.execute(ClusterState) have been processed
properly by all listeners. |
boolean |
mustAck(DiscoveryNode discoveryNode)
Called to determine which nodes the acknowledgement is expected from
|
protected abstract Response |
newResponse(boolean acknowledged) |
void |
onAckTimeout()
Called once the acknowledgement timeout defined by
ackTimeout() has expired |
void |
onAllNodesAcked(Throwable t)
Called once all the nodes have acknowledged the cluster state update request.
|
void |
onFailure(String source,
Throwable t)
A callback called when execute fails.
|
TimeValue |
timeout()
If the cluster state update task wasn't processed by the provided timeout, call
ClusterStateUpdateTask.onFailure(String, Throwable) |
execute, onNoLongerMaster, runOnlyOnMasterprotected AckedClusterStateUpdateTask(AckedRequest request, ActionListener<Response> listener)
public boolean mustAck(DiscoveryNode discoveryNode)
discoveryNode - a nodepublic void onAllNodesAcked(@Nullable Throwable t)
t - optional error that might have been thrownprotected abstract Response newResponse(boolean acknowledged)
public void onAckTimeout()
ackTimeout() has expiredpublic void onFailure(String source, Throwable t)
ClusterStateUpdateTaskonFailure in class ClusterStateUpdateTaskpublic void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState)
ProcessedClusterStateUpdateTaskClusterStateUpdateTask.execute(ClusterState) have been processed
properly by all listeners.clusterStateProcessed in class ProcessedClusterStateUpdateTaskpublic TimeValue ackTimeout()
public TimeValue timeout()
TimeoutClusterStateUpdateTaskClusterStateUpdateTask.onFailure(String, Throwable)timeout in class TimeoutClusterStateUpdateTaskCopyright © 2009–2016. All rights reserved.