org.elasticsearch.action.index
Class TransportIndexAction
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.action.support.BaseAction<Request,Response>
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
org.elasticsearch.action.index.TransportIndexAction
- All Implemented Interfaces:
- Action<IndexRequest,IndexResponse>
public class TransportIndexAction
- extends TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
Performs the index operation.
Allows for the following settings:
- autoCreateIndex: When set to true, will automatically create an index if one does not exists.
Defaults to true.
- allowIdGeneration: If the id is set not, should it be generated. Defaults to true.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransportIndexAction
@Inject
public TransportIndexAction(Settings settings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ShardStateAction shardStateAction,
TransportCreateIndexAction createIndexAction,
MappingUpdatedAction mappingUpdatedAction)
doExecute
protected void doExecute(IndexRequest request,
ActionListener<IndexResponse> listener)
- Overrides:
doExecute
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
checkWriteConsistency
protected boolean checkWriteConsistency()
- Specified by:
checkWriteConsistency
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
newRequestInstance
protected IndexRequest newRequestInstance()
- Specified by:
newRequestInstance
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
newResponseInstance
protected IndexResponse newResponseInstance()
- Specified by:
newResponseInstance
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
transportAction
protected java.lang.String transportAction()
- Specified by:
transportAction
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
executor
protected java.lang.String executor()
- Specified by:
executor
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
checkBlock
protected void checkBlock(IndexRequest request,
ClusterState state)
- Overrides:
checkBlock
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
shards
protected ShardIterator shards(ClusterState clusterState,
IndexRequest request)
- Specified by:
shards
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
shardOperationOnPrimary
protected TransportShardReplicationOperationAction.PrimaryResponse<IndexResponse> shardOperationOnPrimary(ClusterState clusterState,
TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
- Specified by:
shardOperationOnPrimary
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
postPrimaryOperation
protected void postPrimaryOperation(IndexRequest request,
TransportShardReplicationOperationAction.PrimaryResponse<IndexResponse> response)
- Description copied from class:
TransportShardReplicationOperationAction
- Called once replica operations have been dispatched on the
- Overrides:
postPrimaryOperation
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
shardOperationOnReplica
protected void shardOperationOnReplica(TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
- Specified by:
shardOperationOnReplica
in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>