Package org.elasticsearch.discovery
Class AckClusterStatePublishResponseHandler
java.lang.Object
org.elasticsearch.discovery.BlockingClusterStatePublishResponseHandler
org.elasticsearch.discovery.AckClusterStatePublishResponseHandler
public class AckClusterStatePublishResponseHandler
extends BlockingClusterStatePublishResponseHandler
Allows to wait for all nodes to reply to the publish of a new cluster state
and notifies the
ClusterStatePublisher.AckListener
so that the cluster state update can be acknowledged-
Constructor Summary
ConstructorDescriptionAckClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes, ClusterStatePublisher.AckListener ackListener)
Creates a new AckClusterStatePublishResponseHandler -
Method Summary
Modifier and TypeMethodDescriptionvoid
onFailure(DiscoveryNode node, Exception e)
Called for each failure obtained from non master nodesvoid
onResponse(DiscoveryNode node)
Called for each response obtained from non master nodesMethods inherited from class org.elasticsearch.discovery.BlockingClusterStatePublishResponseHandler
awaitAllNodes, getFailedNodes, pendingNodes
-
Constructor Details
-
AckClusterStatePublishResponseHandler
public AckClusterStatePublishResponseHandler(Set<DiscoveryNode> publishingToNodes, ClusterStatePublisher.AckListener ackListener)Creates a new AckClusterStatePublishResponseHandler- Parameters:
publishingToNodes
- the set of nodes to which the cluster state will be published and should respondackListener
- theClusterStatePublisher.AckListener
to notify for each response gotten from non master nodes
-
-
Method Details
-
onResponse
Description copied from class:BlockingClusterStatePublishResponseHandler
Called for each response obtained from non master nodes- Overrides:
onResponse
in classBlockingClusterStatePublishResponseHandler
- Parameters:
node
- the node that replied to the publish event
-
onFailure
Description copied from class:BlockingClusterStatePublishResponseHandler
Called for each failure obtained from non master nodes- Overrides:
onFailure
in classBlockingClusterStatePublishResponseHandler
- Parameters:
node
- the node that replied to the publish event
-