org.elasticsearch.action.support.single.instance
Class TransportInstanceSingleOperationAction<Request extends InstanceShardOperationRequest,Response 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.single.instance.TransportInstanceSingleOperationAction<Request,Response>
Direct Known Subclasses:
TransportUpdateAction

public abstract class TransportInstanceSingleOperationAction<Request extends InstanceShardOperationRequest,Response extends ActionResponse>
extends TransportAction<Request,Response>


Field Summary
protected  ClusterService clusterService
           
protected  TransportService transportService
           
 
Fields inherited from class org.elasticsearch.action.support.TransportAction
threadPool
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
protected TransportInstanceSingleOperationAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService)
           
 
Method Summary
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  String executor()
           
protected abstract  Request newRequest()
           
protected abstract  Response newResponse()
           
protected  boolean resolveRequest(ClusterState state, Request request, ActionListener<Response> listener)
          Resolves the request, by default, simply setting the concrete index (if its aliased one).
protected  boolean retryOnFailure(Throwable e)
           
protected abstract  void shardOperation(Request request, ActionListener<Response> listener)
           
protected abstract  ShardIterator shards(ClusterState clusterState, Request request)
          Should return an iterator with a single shard!
protected abstract  String transportAction()
           
protected  TransportRequestOptions transportOptions()
           
 
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

transportService

protected final TransportService transportService
Constructor Detail

TransportInstanceSingleOperationAction

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

doExecute

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

executor

protected abstract String executor()

transportAction

protected abstract String transportAction()

shardOperation

protected abstract void shardOperation(Request request,
                                       ActionListener<Response> listener)
                                throws ElasticSearchException
Throws:
ElasticSearchException

newRequest

protected abstract Request newRequest()

newResponse

protected abstract Response newResponse()

checkGlobalBlock

protected abstract ClusterBlockException checkGlobalBlock(ClusterState state,
                                                          Request request)

checkRequestBlock

protected abstract ClusterBlockException checkRequestBlock(ClusterState state,
                                                           Request request)

resolveRequest

protected boolean resolveRequest(ClusterState state,
                                 Request request,
                                 ActionListener<Response> listener)
Resolves the request, by default, simply setting the concrete index (if its aliased one). If the resolve means a different execution, then return false here to indicate not to continue and execute this request.


retryOnFailure

protected boolean retryOnFailure(Throwable e)

transportOptions

protected TransportRequestOptions transportOptions()

shards

protected abstract ShardIterator shards(ClusterState clusterState,
                                        Request request)
                                 throws ElasticSearchException
Should return an iterator with a single shard!

Throws:
ElasticSearchException


Copyright © 2009-2012. All Rights Reserved.