public class GlobalCheckpointSyncAction extends TransportReplicationAction<GlobalCheckpointSyncAction.Request,GlobalCheckpointSyncAction.Request,ReplicationResponse> implements IndexEventListener
Modifier and Type | Class and Description |
---|---|
static class |
GlobalCheckpointSyncAction.Request |
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.OperationTransportHandler, TransportReplicationAction.PrimaryOperationTransportHandler, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaOperationTransportHandler, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_NAME |
clusterService, executor, indicesService, shardStateAction, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
actionName, indexNameExpressionResolver, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
GlobalCheckpointSyncAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) |
Modifier and Type | Method and Description |
---|---|
protected ReplicationResponse |
newResponseInstance() |
void |
onShardInactive(IndexShard indexShard)
Called when a shard is marked as inactive
|
protected void |
sendReplicaRequest(TransportReplicationAction.ConcreteReplicaRequest<GlobalCheckpointSyncAction.Request> replicaRequest,
DiscoveryNode node,
ActionListener<ReplicationOperation.ReplicaResponse> listener)
Sends the specified replica request to the specified node.
|
protected TransportReplicationAction.PrimaryResult<GlobalCheckpointSyncAction.Request,ReplicationResponse> |
shardOperationOnPrimary(GlobalCheckpointSyncAction.Request request,
IndexShard indexShard)
Primary operation on node with primary copy.
|
protected TransportReplicationAction.ReplicaResult |
shardOperationOnReplica(GlobalCheckpointSyncAction.Request request,
IndexShard indexShard)
Synchronously execute the specified replica operation.
|
doExecute, doExecute, getIndexShard, globalBlockLevel, indexBlockLevel, newReplicasProxy, registerRequestHandlers, resolveIndex, resolveRequest, retryPrimaryException, transportOptions
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onStoreClosed, shardRoutingChanged
@Inject public GlobalCheckpointSyncAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
protected ReplicationResponse newResponseInstance()
protected void sendReplicaRequest(TransportReplicationAction.ConcreteReplicaRequest<GlobalCheckpointSyncAction.Request> replicaRequest, DiscoveryNode node, ActionListener<ReplicationOperation.ReplicaResponse> listener)
TransportReplicationAction
sendReplicaRequest
in class TransportReplicationAction<GlobalCheckpointSyncAction.Request,GlobalCheckpointSyncAction.Request,ReplicationResponse>
replicaRequest
- the replica requestnode
- the node to send the request tolistener
- callback for handling the response or failurepublic void onShardInactive(IndexShard indexShard)
IndexEventListener
onShardInactive
in interface IndexEventListener
indexShard
- The shard that was marked inactiveprotected TransportReplicationAction.PrimaryResult<GlobalCheckpointSyncAction.Request,ReplicationResponse> shardOperationOnPrimary(GlobalCheckpointSyncAction.Request request, IndexShard indexShard) throws java.lang.Exception
TransportReplicationAction
shardOperationOnPrimary
in class TransportReplicationAction<GlobalCheckpointSyncAction.Request,GlobalCheckpointSyncAction.Request,ReplicationResponse>
request
- the request to the primary shardindexShard
- the primary shard to perform the operation onjava.lang.Exception
protected TransportReplicationAction.ReplicaResult shardOperationOnReplica(GlobalCheckpointSyncAction.Request request, IndexShard indexShard) throws java.lang.Exception
TransportReplicationAction
IndexShard.acquireReplicaOperationPermit(long, long, ActionListener, String)
.shardOperationOnReplica
in class TransportReplicationAction<GlobalCheckpointSyncAction.Request,GlobalCheckpointSyncAction.Request,ReplicationResponse>
request
- the request to the replica shardindexShard
- the replica shard to perform the operation onjava.lang.Exception