Class TransportVerifyShardBeforeCloseAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.replication.TransportReplicationAction<TransportVerifyShardBeforeCloseAction.ShardRequest,TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>
org.elasticsearch.action.admin.indices.close.TransportVerifyShardBeforeCloseAction
public class TransportVerifyShardBeforeCloseAction
extends TransportReplicationAction<TransportVerifyShardBeforeCloseAction.ShardRequest,TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
clusterService, executor, forceExecutionOnPrimary, indicesService, REPLICATION_INITIAL_RETRY_BACKOFF_BOUND, REPLICATION_RETRY_TIMEOUT, shardStateAction, threadPool, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager
-
Constructor Summary
ConstructorDescriptionTransportVerifyShardBeforeCloseAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardBeforeCloseAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired)
Executes the logic for acquiring one or more operation permit on a primary shard.protected void
acquireReplicaOperationPermit(IndexShard replica, TransportVerifyShardBeforeCloseAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdateOrDeletes)
Executes the logic for acquiring one or more operation permit on a replica shard.protected ReplicationResponse
protected void
shardOperationOnPrimary(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>> listener)
Primary operation on node with primary copy.protected void
shardOperationOnReplica(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener)
Execute the specified replica operation.Methods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
adaptResponse, checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, doExecute, globalBlockLevel, handlePrimaryRequest, handleReplicaRequest, indexBlockLevel, resolveRequest, retryPrimaryException, transportOptions
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
logger
protected org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
TransportVerifyShardBeforeCloseAction
@Inject public TransportVerifyShardBeforeCloseAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters)
-
-
Method Details
-
newResponseInstance
-
acquirePrimaryOperationPermit
protected void acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardBeforeCloseAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired)Description copied from class:TransportReplicationAction
Executes the logic for acquiring one or more operation permit on a primary shard. The default is to acquire a single permit but this method can be overridden to acquire more. -
acquireReplicaOperationPermit
protected void acquireReplicaOperationPermit(IndexShard replica, TransportVerifyShardBeforeCloseAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdateOrDeletes)Description copied from class:TransportReplicationAction
Executes the logic for acquiring one or more operation permit on a replica shard. The default is to acquire a single permit but this method can be overridden to acquire more. -
shardOperationOnPrimary
protected void shardOperationOnPrimary(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>> listener)Description copied from class:TransportReplicationAction
Primary operation on node with primary copy.- Specified by:
shardOperationOnPrimary
in classTransportReplicationAction<TransportVerifyShardBeforeCloseAction.ShardRequest,TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>
- Parameters:
shardRequest
- the request to the primary shardprimary
- the primary shard to perform the operation on
-
shardOperationOnReplica
protected void shardOperationOnReplica(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener)Description copied from class:TransportReplicationAction
Execute the specified replica operation. This is done under a permit fromIndexShard.acquireReplicaOperationPermit(long, long, long, ActionListener, String, Object)
.- Specified by:
shardOperationOnReplica
in classTransportReplicationAction<TransportVerifyShardBeforeCloseAction.ShardRequest,TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse>
- Parameters:
shardRequest
- the request to the replica shardreplica
- the replica shard to perform the operation on
-
newReplicasProxy
protected ReplicationOperation.Replicas<TransportVerifyShardBeforeCloseAction.ShardRequest> newReplicasProxy()
-