org.elasticsearch.gateway.local
Class LocalGateway

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<Gateway>
          extended by org.elasticsearch.gateway.local.LocalGateway
All Implemented Interfaces:
ClusterStateListener, CloseableComponent, LifecycleComponent<Gateway>, Gateway

public class LocalGateway
extends AbstractLifecycleComponent<Gateway>
implements Gateway, ClusterStateListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.gateway.Gateway
Gateway.GatewayStateRecoveredListener
 
Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
LocalGateway(Settings settings, ClusterService clusterService, MetaDataCreateIndexService createIndexService, NodeEnvironment nodeEnv, TransportNodesListGatewayMetaState listGatewayMetaState, TransportNodesListGatewayStartedShards listGatewayStartedShards)
           
 
Method Summary
 void clusterChanged(ClusterChangedEvent event)
          Called when cluster state changes.
 LocalGatewayMetaState currentMetaState()
           
 LocalGatewayStartedShards currentStartedShards()
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 void performStateRecovery(Gateway.GatewayStateRecoveredListener listener)
           
 void reset()
           
 java.lang.Class<? extends org.elasticsearch.common.inject.Module> suggestIndexGateway()
           
 java.lang.String type()
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
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
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Constructor Detail

LocalGateway

@Inject
public LocalGateway(Settings settings,
                           ClusterService clusterService,
                           MetaDataCreateIndexService createIndexService,
                           NodeEnvironment nodeEnv,
                           TransportNodesListGatewayMetaState listGatewayMetaState,
                           TransportNodesListGatewayStartedShards listGatewayStartedShards)
Method Detail

type

public java.lang.String type()
Specified by:
type in interface Gateway

currentMetaState

public LocalGatewayMetaState currentMetaState()

currentStartedShards

public LocalGatewayStartedShards currentStartedShards()

doStart

protected void doStart()
                throws ElasticSearchException
Specified by:
doStart in class AbstractLifecycleComponent<Gateway>
Throws:
ElasticSearchException

doStop

protected void doStop()
               throws ElasticSearchException
Specified by:
doStop in class AbstractLifecycleComponent<Gateway>
Throws:
ElasticSearchException

doClose

protected void doClose()
                throws ElasticSearchException
Specified by:
doClose in class AbstractLifecycleComponent<Gateway>
Throws:
ElasticSearchException

performStateRecovery

public void performStateRecovery(Gateway.GatewayStateRecoveredListener listener)
                          throws GatewayException
Specified by:
performStateRecovery in interface Gateway
Throws:
GatewayException

suggestIndexGateway

public java.lang.Class<? extends org.elasticsearch.common.inject.Module> suggestIndexGateway()
Specified by:
suggestIndexGateway in interface Gateway

reset

public void reset()
           throws java.lang.Exception
Specified by:
reset in interface Gateway
Throws:
java.lang.Exception

clusterChanged

public void clusterChanged(ClusterChangedEvent event)
Description copied from interface: ClusterStateListener
Called when cluster state changes.

Specified by:
clusterChanged in interface ClusterStateListener