Interface AckedClusterStateTaskListener

All Superinterfaces:
ClusterStateTaskListener
All Known Implementing Classes:
AckedClusterStateUpdateTask

public interface AckedClusterStateTaskListener extends ClusterStateTaskListener
  • Method Details

    • mustAck

      boolean mustAck(DiscoveryNode discoveryNode)
      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

      void onAllNodesAcked(@Nullable Exception e)
      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 by AckedClusterStateUpdateTask.ackTimeout() has expired
    • ackTimeout

      org.elasticsearch.core.TimeValue ackTimeout()
      Acknowledgement timeout, maximum time interval to wait for acknowledgements