org.elasticsearch.action.index
Class TransportIndexAction

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.action.support.BaseAction<Request,Response>
          extended by org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction<IndexRequest,IndexResponse>
              extended by 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:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction
TransportShardReplicationOperationAction.AsyncShardOperationAction, TransportShardReplicationOperationAction.ShardOperationRequest
 
Field Summary
 
Fields inherited from class org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction
clusterService, defaultReplicationType, defaultWriteConsistencyLevel, indicesService, shardStateAction, threadPool, transportService
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
TransportIndexAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, TransportCreateIndexAction createIndexAction, MappingUpdatedAction mappingUpdatedAction)
           
 
Method Summary
protected  void checkBlock(IndexRequest request, ClusterState state)
           
protected  boolean checkWriteConsistency()
           
protected  void doExecute(IndexRequest request, ActionListener<IndexResponse> listener)
           
protected  IndexRequest newRequestInstance()
           
protected  IndexResponse newResponseInstance()
           
protected  IndexResponse shardOperationOnPrimary(ClusterState clusterState, TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
           
protected  void shardOperationOnReplica(TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
           
protected  ShardsIterator shards(ClusterState clusterState, IndexRequest request)
           
protected  java.lang.String transportAction()
           
 
Methods inherited from class org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction
ignoreReplicas, indexShard, transportOptions
 
Methods inherited from class org.elasticsearch.action.support.BaseAction
execute, execute
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportIndexAction

@Inject
public TransportIndexAction(Settings settings,
                                   TransportService transportService,
                                   ClusterService clusterService,
                                   IndicesService indicesService,
                                   ThreadPool threadPool,
                                   ShardStateAction shardStateAction,
                                   TransportCreateIndexAction createIndexAction,
                                   MappingUpdatedAction mappingUpdatedAction)
Method Detail

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>

checkBlock

protected void checkBlock(IndexRequest request,
                          ClusterState state)
Overrides:
checkBlock in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>

shards

protected ShardsIterator shards(ClusterState clusterState,
                                IndexRequest request)
Specified by:
shards in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>

shardOperationOnPrimary

protected IndexResponse shardOperationOnPrimary(ClusterState clusterState,
                                                TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
Specified by:
shardOperationOnPrimary in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>

shardOperationOnReplica

protected void shardOperationOnReplica(TransportShardReplicationOperationAction.ShardOperationRequest shardRequest)
Specified by:
shardOperationOnReplica in class TransportShardReplicationOperationAction<IndexRequest,IndexResponse>