org.elasticsearch.action.support.master
Class TransportMasterNodeOperationAction<Request extends MasterNodeOperationRequest,Response extends ActionResponse>

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.master.TransportMasterNodeOperationAction<Request,Response>
All Implemented Interfaces:
Action<Request,Response>
Direct Known Subclasses:
MappingUpdatedAction, TransportCloseIndexAction, TransportClusterHealthAction, TransportClusterStateAction, TransportCreateIndexAction, TransportDeleteIndexAction, TransportDeleteMappingAction, TransportIndicesAliasesAction, TransportNodesShutdownAction, TransportOpenIndexAction, TransportPutMappingAction, TransportUpdateSettingsAction

public abstract class TransportMasterNodeOperationAction<Request extends MasterNodeOperationRequest,Response extends ActionResponse>
extends BaseAction<Request,Response>

A base class for operations that needs to be performed on the master node.


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 TransportMasterNodeOperationAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool)
           
 
Method Summary
protected  void checkBlock(Request request, ClusterState state)
           
protected  void doExecute(Request request, ActionListener<Response> listener)
           
protected  boolean localExecute(Request request)
           
protected abstract  Response masterOperation(Request request, ClusterState state)
           
protected abstract  Request newRequest()
           
protected abstract  Response newResponse()
           
protected  void processBeforeDelegationToMaster(Request request, ClusterState state)
           
protected abstract  java.lang.String transportAction()
           
 
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

transportService

protected final TransportService transportService

clusterService

protected final ClusterService clusterService

threadPool

protected final ThreadPool threadPool
Constructor Detail

TransportMasterNodeOperationAction

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

transportAction

protected abstract java.lang.String transportAction()

newRequest

protected abstract Request newRequest()

newResponse

protected abstract Response newResponse()

masterOperation

protected abstract Response masterOperation(Request request,
                                            ClusterState state)
                                                            throws ElasticSearchException
Throws:
ElasticSearchException

localExecute

protected boolean localExecute(Request request)

checkBlock

protected void checkBlock(Request request,
                          ClusterState state)

processBeforeDelegationToMaster

protected void processBeforeDelegationToMaster(Request request,
                                               ClusterState state)

doExecute

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