public abstract class AckedClusterStateUpdateTask<Response> extends ClusterStateUpdateTask implements AckedClusterStateTaskListener
ClusterStateUpdateTask that allows to be notified when
all the nodes have acknowledged a cluster state update requestClusterStateTaskConfig.BasicClusterStateTaskExecutor.BatchResult<T>, ClusterStateTaskExecutor.TaskResult| Modifier | Constructor and Description |
|---|---|
protected |
AckedClusterStateUpdateTask(AckedRequest request,
ActionListener<Response> listener) |
protected |
AckedClusterStateUpdateTask(Priority priority,
AckedRequest request,
ActionListener<Response> listener) |
| Modifier and Type | Method and Description |
|---|---|
TimeValue |
ackTimeout()
Acknowledgement timeout, maximum time interval to wait for acknowledgements
|
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(java.lang.Throwable t)
Called once all the nodes have acknowledged the cluster state update request.
|
void |
onFailure(java.lang.String source,
java.lang.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, execute, priorityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclusterStateProcessed, onNoLongerMasterbuild, buildclusterStatePublished, runOnlyOnMasterprotected AckedClusterStateUpdateTask(AckedRequest request, ActionListener<Response> listener)
protected AckedClusterStateUpdateTask(Priority priority, AckedRequest request, ActionListener<Response> listener)
public boolean mustAck(DiscoveryNode discoveryNode)
mustAck in interface AckedClusterStateTaskListenerdiscoveryNode - a nodepublic void onAllNodesAcked(@Nullable java.lang.Throwable t)
onAllNodesAcked in interface AckedClusterStateTaskListenert - optional error that might have been thrownprotected abstract Response newResponse(boolean acknowledged)
public void onAckTimeout()
ackTimeout() has expiredonAckTimeout in interface AckedClusterStateTaskListenerpublic void onFailure(java.lang.String source,
java.lang.Throwable t)
ClusterStateUpdateTaskonFailure in interface ClusterStateTaskListeneronFailure in class ClusterStateUpdateTaskpublic TimeValue ackTimeout()
ackTimeout in interface AckedClusterStateTaskListenerpublic TimeValue timeout()
ClusterStateUpdateTaskClusterStateUpdateTask.onFailure(String, Throwable). May return null to indicate no timeout is needed (default).timeout in interface ClusterStateTaskConfigtimeout in class ClusterStateUpdateTask