org.elasticsearch.action.support.replication
Class TransportIndexReplicationOperationAction<Request extends IndexReplicationOperationRequest,Response extends ActionResponse,ShardRequest extends ShardReplicationOperationRequest,ShardReplicaRequest extends ActionRequest,ShardResponse extends ActionResponse>

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.action.support.TransportAction<Request,Response>
          extended by org.elasticsearch.action.support.replication.TransportIndexReplicationOperationAction<Request,Response,ShardRequest,ShardReplicaRequest,ShardResponse>
Direct Known Subclasses:
TransportIndexDeleteAction, TransportIndexDeleteByQueryAction

public abstract class TransportIndexReplicationOperationAction<Request extends IndexReplicationOperationRequest,Response extends ActionResponse,ShardRequest extends ShardReplicationOperationRequest,ShardReplicaRequest extends ActionRequest,ShardResponse extends ActionResponse>
extends TransportAction<Request,Response>


Field Summary
protected  ClusterService clusterService
           
protected  TransportShardReplicationOperationAction<ShardRequest,ShardReplicaRequest,ShardResponse> shardAction
           
 
Fields inherited from class org.elasticsearch.action.support.TransportAction
threadPool
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
TransportIndexReplicationOperationAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, TransportShardReplicationOperationAction<ShardRequest,ShardReplicaRequest,ShardResponse> shardAction)
           
 
Method Summary
protected abstract  boolean accumulateExceptions()
           
protected abstract  ClusterBlockException checkGlobalBlock(ClusterState state, Request request)
           
protected abstract  ClusterBlockException checkRequestBlock(ClusterState state, Request request)
           
protected  void doExecute(Request request, ActionListener<Response> listener)
           
protected abstract  Request newRequestInstance()
           
protected abstract  Response newResponseInstance(Request request, AtomicReferenceArray shardsResponses)
           
protected abstract  ShardRequest newShardRequestInstance(Request request, int shardId)
           
protected abstract  GroupShardsIterator shards(Request request)
           
protected abstract  String transportAction()
           
 
Methods inherited from class org.elasticsearch.action.support.TransportAction
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
 

Field Detail

clusterService

protected final ClusterService clusterService

shardAction

protected final TransportShardReplicationOperationAction<ShardRequest extends ShardReplicationOperationRequest,ShardReplicaRequest extends ActionRequest,ShardResponse extends ActionResponse> shardAction
Constructor Detail

TransportIndexReplicationOperationAction

@Inject
public TransportIndexReplicationOperationAction(Settings settings,
                                                       TransportService transportService,
                                                       ClusterService clusterService,
                                                       ThreadPool threadPool,
                                                       TransportShardReplicationOperationAction<ShardRequest,ShardReplicaRequest,ShardResponse> shardAction)
Method Detail

doExecute

protected void doExecute(Request request,
                         ActionListener<Response> listener)
Specified by:
doExecute in class TransportAction<Request extends IndexReplicationOperationRequest,Response extends ActionResponse>

newRequestInstance

protected abstract Request newRequestInstance()

newResponseInstance

protected abstract Response newResponseInstance(Request request,
                                                AtomicReferenceArray shardsResponses)

transportAction

protected abstract String transportAction()

shards

protected abstract GroupShardsIterator shards(Request request)
                                       throws ElasticSearchException
Throws:
ElasticSearchException

newShardRequestInstance

protected abstract ShardRequest newShardRequestInstance(Request request,
                                                        int shardId)

accumulateExceptions

protected abstract boolean accumulateExceptions()

checkGlobalBlock

protected abstract ClusterBlockException checkGlobalBlock(ClusterState state,
                                                          Request request)

checkRequestBlock

protected abstract ClusterBlockException checkRequestBlock(ClusterState state,
                                                           Request request)


Copyright © 2009-2012. All Rights Reserved.