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.TransportAction<Request,Response>
          extended by org.elasticsearch.action.support.master.TransportMasterNodeOperationAction<Request,Response>
Direct Known Subclasses:
MappingUpdatedAction, TransportCloseIndexAction, TransportClusterHealthAction, TransportClusterRerouteAction, TransportClusterStateAction, TransportClusterUpdateSettingsAction, TransportCreateIndexAction, TransportDeleteIndexAction, TransportDeleteIndexTemplateAction, TransportDeleteMappingAction, TransportDeleteWarmerAction, TransportIndicesAliasesAction, TransportIndicesExistsAction, TransportNodesShutdownAction, TransportOpenIndexAction, TransportPutIndexTemplateAction, TransportPutMappingAction, TransportPutWarmerAction, TransportUpdateSettingsAction

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

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


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 TransportMasterNodeOperationAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool)
           
 
Method Summary
protected  ClusterBlockException checkBlock(Request request, ClusterState state)
           
protected  void doExecute(Request request, ActionListener<Response> listener)
           
protected abstract  String executor()
           
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  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

transportService

protected final TransportService transportService

clusterService

protected final ClusterService clusterService
Constructor Detail

TransportMasterNodeOperationAction

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

transportAction

protected abstract String transportAction()

executor

protected abstract String executor()

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 ClusterBlockException 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 TransportAction<Request extends MasterNodeOperationRequest,Response extends ActionResponse>


Copyright © 2009-2012. All Rights Reserved.