public abstract class AckedClusterStateUpdateTask<Response> extends TimeoutClusterStateUpdateTask
ClusterStateUpdateTask
that allows to be notified when
all the nodes have acknowledged a cluster state update requestModifier | 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, runOnlyOnMaster
protected 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)
ClusterStateUpdateTask
onFailure
in class ClusterStateUpdateTask
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState)
ProcessedClusterStateUpdateTask
ClusterStateUpdateTask.execute(ClusterState)
have been processed
properly by all listeners.clusterStateProcessed
in class ProcessedClusterStateUpdateTask
public TimeValue ackTimeout()
public TimeValue timeout()
TimeoutClusterStateUpdateTask
ClusterStateUpdateTask.onFailure(String, Throwable)
timeout
in class TimeoutClusterStateUpdateTask
Copyright © 2009–2015. All rights reserved.