public class PublishClusterStateAction extends AbstractComponent
Modifier and Type | Class and Description |
---|---|
protected static class |
PublishClusterStateAction.CommitClusterStateRequest |
static interface |
PublishClusterStateAction.NewPendingClusterStateListener |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMIT_ACTION_NAME |
static java.lang.String |
SEND_ACTION_NAME |
static java.lang.String |
SETTINGS_MAX_PENDING_CLUSTER_STATES |
deprecationLogger, logger, settings
Constructor and Description |
---|
PublishClusterStateAction(Settings settings,
TransportService transportService,
NamedWriteableRegistry namedWriteableRegistry,
java.util.function.Supplier<ClusterState> clusterStateSupplier,
PublishClusterStateAction.NewPendingClusterStateListener listener,
DiscoverySettings discoverySettings,
ClusterName clusterName) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleCommitRequest(PublishClusterStateAction.CommitClusterStateRequest request,
TransportChannel channel) |
protected void |
handleIncomingClusterStateRequest(BytesTransportRequest request,
TransportChannel channel) |
PendingClusterStatesQueue |
pendingStatesQueue() |
void |
publish(ClusterChangedEvent clusterChangedEvent,
int minMasterNodes,
Discovery.AckListener ackListener)
publishes a cluster change event to other nodes.
|
static BytesReference |
serializeDiffClusterState(Diff diff,
Version nodeVersion) |
static BytesReference |
serializeFullClusterState(ClusterState clusterState,
Version nodeVersion) |
logDeprecatedSetting, logRemovedSetting, nodeName
public static final java.lang.String SEND_ACTION_NAME
public static final java.lang.String COMMIT_ACTION_NAME
public static final java.lang.String SETTINGS_MAX_PENDING_CLUSTER_STATES
public PublishClusterStateAction(Settings settings, TransportService transportService, NamedWriteableRegistry namedWriteableRegistry, java.util.function.Supplier<ClusterState> clusterStateSupplier, PublishClusterStateAction.NewPendingClusterStateListener listener, DiscoverySettings discoverySettings, ClusterName clusterName)
public PendingClusterStatesQueue pendingStatesQueue()
public void publish(ClusterChangedEvent clusterChangedEvent, int minMasterNodes, Discovery.AckListener ackListener) throws Discovery.FailedToCommitClusterStateException
The method is guaranteed to throw a Discovery.FailedToCommitClusterStateException
if the change is not committed and should be rejected.
Any other exception signals the something wrong happened but the change is committed.
public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws java.io.IOException
java.io.IOException
public static BytesReference serializeDiffClusterState(Diff diff, Version nodeVersion) throws java.io.IOException
java.io.IOException
protected void handleIncomingClusterStateRequest(BytesTransportRequest request, TransportChannel channel) throws java.io.IOException
java.io.IOException
protected void handleCommitRequest(PublishClusterStateAction.CommitClusterStateRequest request, TransportChannel channel)