public abstract class TransportWriteAction<Request extends ReplicatedWriteRequest<Request>,Response extends ReplicationResponse & WriteResponse> extends TransportReplicationAction<Request,Request,Response>
Modifier and Type | Class and Description |
---|---|
static class |
TransportWriteAction.WriteResult<Response extends ReplicationResponse>
Simple result from a write action.
|
TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryResult, TransportReplicationAction.ReplicaResult, TransportReplicationAction.RetryOnReplicaException
clusterService, indicesService, transportService
actionName, indexNameExpressionResolver, parseFieldMatcher, taskManager, threadPool
deprecationLogger, logger, settings
Modifier | Constructor and Description |
---|---|
protected |
TransportWriteAction(Settings settings,
java.lang.String actionName,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
java.util.function.Supplier<Request> request,
java.lang.String executor) |
Modifier and Type | Method and Description |
---|---|
protected IndexShard |
indexShard(Request request)
Fetch the IndexShard for the request.
|
protected abstract TransportWriteAction.WriteResult<Response> |
onPrimaryShard(Request request,
IndexShard indexShard)
Called on the primary with a reference to the IndexShard to modify.
|
protected abstract Translog.Location |
onReplicaShard(Request request,
IndexShard indexShard)
Called once per replica with a reference to the IndexShard to modify.
|
protected org.elasticsearch.action.support.replication.TransportWriteAction.WritePrimaryResult |
shardOperationOnPrimary(Request request)
Primary operation on node with primary copy.
|
protected org.elasticsearch.action.support.replication.TransportWriteAction.WriteReplicaResult |
shardOperationOnReplica(Request request)
Synchronous replica operation on nodes with replica copies.
|
acquirePrimaryShardReference, acquireReplicaOperationLock, doExecute, doExecute, globalBlockLevel, indexBlockLevel, newResponseInstance, resolveIndex, resolveRequest, retryPrimaryException, shouldExecuteReplication, transportOptions
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
protected TransportWriteAction(Settings settings, java.lang.String actionName, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request, java.lang.String executor)
protected abstract TransportWriteAction.WriteResult<Response> onPrimaryShard(Request request, IndexShard indexShard) throws java.lang.Exception
java.lang.Exception
protected abstract Translog.Location onReplicaShard(Request request, IndexShard indexShard)
protected final org.elasticsearch.action.support.replication.TransportWriteAction.WritePrimaryResult shardOperationOnPrimary(Request request) throws java.lang.Exception
TransportReplicationAction
shardOperationOnPrimary
in class TransportReplicationAction<Request extends ReplicatedWriteRequest<Request>,Request extends ReplicatedWriteRequest<Request>,Response extends ReplicationResponse & WriteResponse>
request
- the request to the primary shardjava.lang.Exception
protected final org.elasticsearch.action.support.replication.TransportWriteAction.WriteReplicaResult shardOperationOnReplica(Request request)
TransportReplicationAction
TransportReplicationAction.acquireReplicaOperationLock(ShardId, long, String, ActionListener)
.shardOperationOnReplica
in class TransportReplicationAction<Request extends ReplicatedWriteRequest<Request>,Request extends ReplicatedWriteRequest<Request>,Response extends ReplicationResponse & WriteResponse>
protected IndexShard indexShard(Request request)