Package org.elasticsearch.discovery.zen
Class PublishClusterStateAction
org.elasticsearch.discovery.zen.PublishClusterStateAction
public class PublishClusterStateAction
extends
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPublishClusterStateAction(TransportService transportService, NamedWriteableRegistry namedWriteableRegistry, PublishClusterStateAction.IncomingClusterStateListener incomingClusterStateListener, DiscoverySettings discoverySettings)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleCommitRequest(PublishClusterStateAction.CommitClusterStateRequest request, TransportChannel channel)
protected void
handleIncomingClusterStateRequest(BytesTransportRequest request, TransportChannel channel)
void
publish(ClusterChangedEvent clusterChangedEvent, int minMasterNodes, ClusterStatePublisher.AckListener ackListener)
publishes a cluster change event to other nodes.static BytesReference
serializeDiffClusterState(Diff diff, Version nodeVersion)
static BytesReference
serializeFullClusterState(ClusterState clusterState, Version nodeVersion)
stats()
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
SEND_ACTION_NAME
public static final SEND_ACTION_NAME- See Also:
- Constant Field Values
-
COMMIT_ACTION_NAME
public static final COMMIT_ACTION_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
PublishClusterStateAction
public PublishClusterStateAction(TransportService transportService, NamedWriteableRegistry namedWriteableRegistry, PublishClusterStateAction.IncomingClusterStateListener incomingClusterStateListener, DiscoverySettings discoverySettings)
-
-
Method Details
-
publish
public void publish(ClusterChangedEvent clusterChangedEvent, int minMasterNodes, ClusterStatePublisher.AckListener ackListener) throws FailedToCommitClusterStateExceptionpublishes a cluster change event to other nodes. if at least minMasterNodes acknowledge the change it is committed and will be processed by the master and the other nodes.The method is guaranteed to throw a
FailedToCommitClusterStateException
if the change is not committed and should be rejected. Any other exception signals the something wrong happened but the change is committed. -
serializeFullClusterState
public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws- Throws:
-
serializeDiffClusterState
- Throws:
-
handleIncomingClusterStateRequest
protected void handleIncomingClusterStateRequest(BytesTransportRequest request, TransportChannel channel) throws- Throws:
-
handleCommitRequest
protected void handleCommitRequest(PublishClusterStateAction.CommitClusterStateRequest request, TransportChannel channel) -
stats
-