Class TransportVerifyShardBeforeCloseAction
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- 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 Modifier and Type Class Description static class
TransportVerifyShardBeforeCloseAction.ShardRequest
-
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
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
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
logger
static java.lang.String
NAME
-
Fields inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
clusterService, executor, indicesService, shardStateAction, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, indexNameExpressionResolver, taskManager, threadPool
-
-
Constructor Summary
Constructors Constructor Description TransportVerifyShardBeforeCloseAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters, IndexNameExpressionResolver resolver)
-
Method Summary
-
Methods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
doExecute, doExecute, getIndexShard, globalBlockLevel, indexBlockLevel, registerRequestHandlers, resolveIndex, resolveRequest, retryPrimaryException, sendReplicaRequest, transportOptions
-
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute, execute
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
logger
protected org.apache.logging.log4j.Logger logger
-
-
Constructor Detail
-
TransportVerifyShardBeforeCloseAction
@Inject public TransportVerifyShardBeforeCloseAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters, IndexNameExpressionResolver resolver)
-
-
Method Detail
-
newResponseInstance
protected ReplicationResponse newResponseInstance()
-
acquirePrimaryOperationPermit
protected void acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardBeforeCloseAction.ShardRequest request, ActionListener<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<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 TransportReplicationAction.PrimaryResult<TransportVerifyShardBeforeCloseAction.ShardRequest,ReplicationResponse> shardOperationOnPrimary(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard primary) throws java.lang.Exception
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- Throws:
java.lang.Exception
-
shardOperationOnReplica
protected TransportReplicationAction.ReplicaResult shardOperationOnReplica(TransportVerifyShardBeforeCloseAction.ShardRequest shardRequest, IndexShard replica) throws java.lang.Exception
Description copied from class:TransportReplicationAction
Synchronously 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- Throws:
java.lang.Exception
-
newReplicasProxy
protected ReplicationOperation.Replicas<TransportVerifyShardBeforeCloseAction.ShardRequest> newReplicasProxy(long primaryTerm)
-
-