public abstract class TransportShardAction<R extends ShardRequest> extends org.elasticsearch.action.support.replication.TransportReplicationAction<R,R,ShardResponse> implements KillAllListener
org.elasticsearch.action.support.replication.TransportReplicationAction.RetryOnPrimaryException, org.elasticsearch.action.support.replication.TransportReplicationAction.RetryOnReplicaException, org.elasticsearch.action.support.replication.TransportReplicationAction.WriteResult<T extends org.elasticsearch.action.ActionWriteResponse>
clusterService, defaultWriteConsistencyLevel, indicesService, mappingUpdatedAction, shardStateAction, transportOptions, transportService
Constructor and Description |
---|
TransportShardAction(org.elasticsearch.common.settings.Settings settings,
java.lang.String actionName,
org.elasticsearch.transport.TransportService transportService,
org.elasticsearch.cluster.action.index.MappingUpdatedAction mappingUpdatedAction,
org.elasticsearch.cluster.metadata.IndexNameExpressionResolver indexNameExpressionResolver,
org.elasticsearch.cluster.ClusterService clusterService,
org.elasticsearch.indices.IndicesService indicesService,
org.elasticsearch.threadpool.ThreadPool threadPool,
org.elasticsearch.cluster.action.shard.ShardStateAction shardStateAction,
org.elasticsearch.action.support.ActionFilters actionFilters,
java.lang.Class<R> requestClass) |
Modifier and Type | Method and Description |
---|---|
void |
killAllJobs(long timestamp) |
void |
killJob(java.util.UUID jobId) |
protected ShardResponse |
newResponseInstance() |
protected abstract ShardResponse |
processRequestItems(org.elasticsearch.index.shard.ShardId shardId,
R request,
java.util.concurrent.atomic.AtomicBoolean killed) |
protected abstract void |
processRequestItemsOnReplica(org.elasticsearch.index.shard.ShardId shardId,
R request) |
protected boolean |
resolveIndex() |
protected org.elasticsearch.common.collect.Tuple<ShardResponse,R> |
shardOperationOnPrimary(org.elasticsearch.cluster.metadata.MetaData metaData,
R shardRequest) |
protected void |
shardOperationOnReplica(R shardRequest) |
protected org.elasticsearch.common.collect.Tuple<ShardResponse,R> |
wrapOperationInKillable(R request,
KillableCallable<org.elasticsearch.common.collect.Tuple> callable) |
checkWriteConsistency, doExecute, doExecute, getIndexShardOperationsCounter, globalBlockLevel, ignoreReplicaException, indexBlockLevel, isConflictException, mustFailReplica, processAfterWrite, resolveRequest, retryPrimaryException, shouldExecuteReplication, transportOptions
execute, execute, execute, execute
public TransportShardAction(org.elasticsearch.common.settings.Settings settings, java.lang.String actionName, org.elasticsearch.transport.TransportService transportService, org.elasticsearch.cluster.action.index.MappingUpdatedAction mappingUpdatedAction, org.elasticsearch.cluster.metadata.IndexNameExpressionResolver indexNameExpressionResolver, org.elasticsearch.cluster.ClusterService clusterService, org.elasticsearch.indices.IndicesService indicesService, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.cluster.action.shard.ShardStateAction shardStateAction, org.elasticsearch.action.support.ActionFilters actionFilters, java.lang.Class<R> requestClass)
protected ShardResponse newResponseInstance()
newResponseInstance
in class org.elasticsearch.action.support.replication.TransportReplicationAction<R extends ShardRequest,R extends ShardRequest,ShardResponse>
protected boolean resolveIndex()
resolveIndex
in class org.elasticsearch.action.support.replication.TransportReplicationAction<R extends ShardRequest,R extends ShardRequest,ShardResponse>
protected void shardOperationOnReplica(R shardRequest)
shardOperationOnReplica
in class org.elasticsearch.action.support.replication.TransportReplicationAction<R extends ShardRequest,R extends ShardRequest,ShardResponse>
protected org.elasticsearch.common.collect.Tuple<ShardResponse,R> shardOperationOnPrimary(org.elasticsearch.cluster.metadata.MetaData metaData, R shardRequest) throws java.lang.Throwable
shardOperationOnPrimary
in class org.elasticsearch.action.support.replication.TransportReplicationAction<R extends ShardRequest,R extends ShardRequest,ShardResponse>
java.lang.Throwable
protected org.elasticsearch.common.collect.Tuple<ShardResponse,R> wrapOperationInKillable(R request, KillableCallable<org.elasticsearch.common.collect.Tuple> callable)
public void killAllJobs(long timestamp)
killAllJobs
in interface KillAllListener
public void killJob(java.util.UUID jobId)
killJob
in interface KillAllListener
protected abstract ShardResponse processRequestItems(org.elasticsearch.index.shard.ShardId shardId, R request, java.util.concurrent.atomic.AtomicBoolean killed) throws java.lang.InterruptedException
java.lang.InterruptedException
protected abstract void processRequestItemsOnReplica(org.elasticsearch.index.shard.ShardId shardId, R request)