Package org.elasticsearch.cluster
Interface AckedClusterStateTaskListener
- All Superinterfaces:
ClusterStateTaskListener
- All Known Implementing Classes:
AckedClusterStateUpdateTask
-
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.TimeValue
Acknowledgement timeout, maximum time interval to wait for acknowledgementsboolean
mustAck(DiscoveryNode discoveryNode)
Called to determine which nodes the acknowledgement is expected from.void
Called once the acknowledgement timeout defined byAckedClusterStateUpdateTask.ackTimeout()
has expiredvoid
Called once all the nodes have acknowledged the cluster state update request.Methods inherited from interface org.elasticsearch.cluster.ClusterStateTaskListener
clusterStateProcessed, onFailure, onNoLongerMaster
-
Method Details
-
mustAck
Called to determine which nodes the acknowledgement is expected from. As this method will be called multiple times to determine the set of acking nodes, it is crucial for it to return consistent results: Given the same listener instance and the same node parameter, the method implementation should return the same result.- Parameters:
discoveryNode
- a node- Returns:
- true if the node is expected to send ack back, false otherwise
-
onAllNodesAcked
Called once all the nodes have acknowledged the cluster state update request. Must be very lightweight execution, since it gets executed on the cluster service thread.- Parameters:
e
- optional error that might have been thrown
-
onAckTimeout
void onAckTimeout()Called once the acknowledgement timeout defined byAckedClusterStateUpdateTask.ackTimeout()
has expired -
ackTimeout
org.elasticsearch.core.TimeValue ackTimeout()Acknowledgement timeout, maximum time interval to wait for acknowledgements
-