PrimaryReplicaSyncer.SyncAction
public class TransportResyncReplicationAction extends TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse> implements PrimaryReplicaSyncer.SyncAction
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
TransportWriteAction.WritePrimaryResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,Response extends ReplicationResponse & WriteResponse>, TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>>
deprecationLogger, logger, settings
actionName, indexNameExpressionResolver, taskManager, threadPool
clusterService, executor, indicesService, shardStateAction, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
Constructor | Description |
---|---|
TransportResyncReplicationAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) |
logDeprecatedSetting, logRemovedSetting, nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, execute, execute, execute
doExecute, doExecute, getIndexShard, resolveIndex, resolveRequest, retryPrimaryException, transportOptions
globalBlockLevel, indexBlockLevel, locationToSync, syncOperationResultOrThrow
@Inject public TransportResyncReplicationAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
protected void registerRequestHandlers(java.lang.String actionName, TransportService transportService, java.util.function.Supplier<ResyncReplicationRequest> request, java.util.function.Supplier<ResyncReplicationRequest> replicaRequest, java.lang.String executor)
protected ResyncReplicationResponse newResponseInstance()
protected ReplicationOperation.Replicas newReplicasProxy(long primaryTerm)
protected void sendReplicaRequest(TransportReplicationAction.ConcreteReplicaRequest<ResyncReplicationRequest> replicaRequest, DiscoveryNode node, ActionListener<ReplicationOperation.ReplicaResponse> listener)
TransportReplicationAction
sendReplicaRequest
in class TransportReplicationAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
replicaRequest
- the replica requestnode
- the node to send the request tolistener
- callback for handling the response or failureprotected TransportWriteAction.WritePrimaryResult<ResyncReplicationRequest,ResyncReplicationResponse> shardOperationOnPrimary(ResyncReplicationRequest request, IndexShard primary) throws java.lang.Exception
TransportWriteAction
shardOperationOnPrimary
in class TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
request
- the request to the primary shardprimary
- the primary shard to perform the operation onprimary
shard according to the Request
refresh policyjava.lang.Exception
public static ResyncReplicationRequest performOnPrimary(ResyncReplicationRequest request, IndexShard primary)
protected TransportWriteAction.WriteReplicaResult shardOperationOnReplica(ResyncReplicationRequest request, IndexShard replica) throws java.lang.Exception
TransportWriteAction
shardOperationOnReplica
in class TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
request
- the request to the replica shardreplica
- the replica shard to perform the operation onreplica
shard according to the ReplicaRequest
refresh policyjava.lang.Exception
public static Translog.Location performOnReplica(ResyncReplicationRequest request, IndexShard replica) throws java.lang.Exception
java.lang.Exception
public void sync(ResyncReplicationRequest request, Task parentTask, java.lang.String primaryAllocationId, long primaryTerm, ActionListener<ResyncReplicationResponse> listener)
sync
in interface PrimaryReplicaSyncer.SyncAction