org.elasticsearch.action.support.replication
Class TransportShardReplicationOperationAction<Request extends ShardReplicationOperationRequest,Response extends ActionResponse>
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.action.support.BaseAction<Request,Response>
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction<Request,Response>
- All Implemented Interfaces:
- Action<Request,Response>
- Direct Known Subclasses:
- TransportDeleteAction, TransportIndexAction, TransportShardBulkAction, TransportShardDeleteAction, TransportShardDeleteByQueryAction, TransportShardReplicationPingAction
public abstract class TransportShardReplicationOperationAction<Request extends ShardReplicationOperationRequest,Response extends ActionResponse>
- extends BaseAction<Request,Response>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transportService
protected final TransportService transportService
clusterService
protected final ClusterService clusterService
indicesService
protected final IndicesService indicesService
threadPool
protected final ThreadPool threadPool
shardStateAction
protected final ShardStateAction shardStateAction
defaultReplicationType
protected final ReplicationType defaultReplicationType
defaultWriteConsistencyLevel
protected final WriteConsistencyLevel defaultWriteConsistencyLevel
TransportShardReplicationOperationAction
protected TransportShardReplicationOperationAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction)
doExecute
protected void doExecute(Request request,
ActionListener<Response> listener)
- Specified by:
doExecute
in class BaseAction<Request extends ShardReplicationOperationRequest,Response extends ActionResponse>
newRequestInstance
protected abstract Request newRequestInstance()
newResponseInstance
protected abstract Response newResponseInstance()
transportAction
protected abstract java.lang.String transportAction()
shardOperationOnPrimary
protected abstract Response shardOperationOnPrimary(ClusterState clusterState,
TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
shardOperationOnReplica
protected abstract void shardOperationOnReplica(TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
shards
protected abstract ShardsIterator shards(ClusterState clusterState,
Request request)
throws ElasticSearchException
- Throws:
ElasticSearchException
checkWriteConsistency
protected abstract boolean checkWriteConsistency()
checkBlock
protected void checkBlock(Request request,
ClusterState state)
transportOptions
protected TransportRequestOptions transportOptions()
ignoreReplicas
protected boolean ignoreReplicas()
- Should the operations be performed on the replicas as well. Defaults to false meaning operations
will be executed on the replica.
indexShard
protected IndexShard indexShard(TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)