org.elasticsearch.action.support.broadcast
Class TransportBroadcastOperationAction<Request extends BroadcastOperationRequest,Response extends BroadcastOperationResponse,ShardRequest extends BroadcastShardOperationRequest,ShardResponse extends BroadcastShardOperationResponse>

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.broadcast.TransportBroadcastOperationAction<Request,Response,ShardRequest,ShardResponse>
All Implemented Interfaces:
Action<Request,Response>
Direct Known Subclasses:
TransportBroadcastPingAction, TransportClearIndicesCacheAction, TransportCountAction, TransportFlushAction, TransportGatewaySnapshotAction, TransportIndicesSegmentsAction, TransportIndicesStatusAction, TransportOptimizeAction, TransportRefreshAction

public abstract class TransportBroadcastOperationAction<Request extends BroadcastOperationRequest,Response extends BroadcastOperationResponse,ShardRequest extends BroadcastShardOperationRequest,ShardResponse extends BroadcastShardOperationResponse>
extends BaseAction<Request,Response>


Field Summary
protected  ClusterService clusterService
           
protected  ThreadPool threadPool
           
protected  TransportService transportService
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
protected TransportBroadcastOperationAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService)
           
 
Method Summary
protected  boolean accumulateExceptions()
           
protected  void checkBlock(Request request, java.lang.String[] indices, ClusterState state)
           
protected  void doExecute(Request request, ActionListener<Response> listener)
           
protected abstract  java.lang.String executor()
           
protected  boolean ignoreNonActiveExceptions()
           
protected abstract  Request newRequest()
           
protected abstract  Response newResponse(Request request, java.util.concurrent.atomic.AtomicReferenceArray shardsResponses, ClusterState clusterState)
           
protected abstract  ShardRequest newShardRequest()
           
protected abstract  ShardRequest newShardRequest(ShardRouting shard, Request request)
           
protected abstract  ShardResponse newShardResponse()
           
protected abstract  ShardResponse shardOperation(ShardRequest request)
           
protected abstract  GroupShardsIterator shards(Request request, java.lang.String[] concreteIndices, ClusterState clusterState)
           
protected abstract  java.lang.String transportAction()
           
protected abstract  java.lang.String transportShardAction()
           
 
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
 

Field Detail

clusterService

protected final ClusterService clusterService

transportService

protected final TransportService transportService

threadPool

protected final ThreadPool threadPool
Constructor Detail

TransportBroadcastOperationAction

protected TransportBroadcastOperationAction(Settings settings,
                                            ThreadPool threadPool,
                                            ClusterService clusterService,
                                            TransportService transportService)
Method Detail

doExecute

protected void doExecute(Request request,
                         ActionListener<Response> listener)
Specified by:
doExecute in class BaseAction<Request extends BroadcastOperationRequest,Response extends BroadcastOperationResponse>

transportAction

protected abstract java.lang.String transportAction()

transportShardAction

protected abstract java.lang.String transportShardAction()

executor

protected abstract java.lang.String executor()

newRequest

protected abstract Request newRequest()

newResponse

protected abstract Response newResponse(Request request,
                                        java.util.concurrent.atomic.AtomicReferenceArray shardsResponses,
                                        ClusterState clusterState)

newShardRequest

protected abstract ShardRequest newShardRequest()

newShardRequest

protected abstract ShardRequest newShardRequest(ShardRouting shard,
                                                Request request)

newShardResponse

protected abstract ShardResponse newShardResponse()

shardOperation

protected abstract ShardResponse shardOperation(ShardRequest request)
                                                                                 throws ElasticSearchException
Throws:
ElasticSearchException

shards

protected abstract GroupShardsIterator shards(Request request,
                                              java.lang.String[] concreteIndices,
                                              ClusterState clusterState)

accumulateExceptions

protected boolean accumulateExceptions()

ignoreNonActiveExceptions

protected boolean ignoreNonActiveExceptions()

checkBlock

protected void checkBlock(Request request,
                          java.lang.String[] indices,
                          ClusterState state)