public class BlockingClusterStatePublishResponseHandler
extends java.lang.Object
Constructor and Description |
---|
BlockingClusterStatePublishResponseHandler(java.util.Set<DiscoveryNode> publishingToNodes)
Creates a new BlockingClusterStatePublishResponseHandler
|
Modifier and Type | Method and Description |
---|---|
boolean |
awaitAllNodes(TimeValue timeout)
Allows to wait for all non master nodes to reply to the publish event up to a timeout
|
void |
onFailure(DiscoveryNode node,
java.lang.Exception e)
Called for each failure obtained from non master nodes
|
void |
onResponse(DiscoveryNode node)
Called for each response obtained from non master nodes
|
DiscoveryNode[] |
pendingNodes()
returns a list of nodes which didn't respond yet
|
public BlockingClusterStatePublishResponseHandler(java.util.Set<DiscoveryNode> publishingToNodes)
publishingToNodes
- the set of nodes to which the cluster state will be published and should respondpublic void onResponse(DiscoveryNode node)
node
- the node that replied to the publish eventpublic void onFailure(DiscoveryNode node, java.lang.Exception e)
node
- the node that replied to the publish eventpublic boolean awaitAllNodes(TimeValue timeout) throws java.lang.InterruptedException
timeout
- the timeoutjava.lang.InterruptedException
public DiscoveryNode[] pendingNodes()