Package org.elasticsearch.action.resync
Class TransportResyncReplicationAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.replication.TransportReplicationAction<Request,ReplicaRequest,Response>
org.elasticsearch.action.support.replication.TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
org.elasticsearch.action.resync.TransportResyncReplicationAction
- All Implemented Interfaces:
PrimaryReplicaSyncer.SyncAction
public class TransportResyncReplicationAction extends TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse> implements PrimaryReplicaSyncer.SyncAction
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportWriteAction
TransportWriteAction.WritePrimaryResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,Response extends ReplicationResponse & WriteResponse>, TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>>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.TransportWriteAction
indexingPressure, systemIndicesFields 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, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, logger, taskManager -
Constructor Summary
Constructors Constructor Description TransportResyncReplicationAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexingPressure indexingPressure, SystemIndices systemIndices) -
Method Summary
Methods inherited from class org.elasticsearch.action.support.replication.TransportWriteAction
checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, executor, force, isSystemShard, locationToSync, shardOperationOnPrimary, shardOperationOnReplica, syncOperationResultOrThrowMethods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
acquirePrimaryOperationPermit, acquireReplicaOperationPermit, adaptResponse, handlePrimaryRequest, handleReplicaRequest, resolveRequest, retryPrimaryException, transportOptionsMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, executeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TransportResyncReplicationAction
@Inject public TransportResyncReplicationAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexingPressure indexingPressure, SystemIndices systemIndices)
-
-
Method Details
-
doExecute
protected void doExecute(Task parentTask, ResyncReplicationRequest request, ActionListener<ResyncReplicationResponse> listener)- Overrides:
doExecutein classTransportReplicationAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
-
newResponseInstance
- Specified by:
newResponseInstancein classTransportReplicationAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>- Throws:
java.io.IOException
-
newReplicasProxy
-
globalBlockLevel
Description copied from class:TransportReplicationActionCluster level block to check before request execution. Returning null means that no blocks need to be checked. -
indexBlockLevel
Description copied from class:TransportReplicationActionIndex level block to check before request execution. Returning null means that no blocks need to be checked.- Overrides:
indexBlockLevelin classTransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
-
dispatchedShardOperationOnPrimary
protected void dispatchedShardOperationOnPrimary(ResyncReplicationRequest request, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<ResyncReplicationRequest,ResyncReplicationResponse>> listener) -
-
performOnPrimary
-
dispatchedShardOperationOnReplica
protected void dispatchedShardOperationOnReplica(ResyncReplicationRequest request, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener) -
replicaOperationSize
-
performOnReplica
public static Translog.Location performOnReplica(ResyncReplicationRequest request, IndexShard replica) throws java.lang.Exception- Throws:
java.lang.Exception
-
sync
public void sync(ResyncReplicationRequest request, Task parentTask, java.lang.String primaryAllocationId, long primaryTerm, ActionListener<ResyncReplicationResponse> listener)- Specified by:
syncin interfacePrimaryReplicaSyncer.SyncAction
-