org.elasticsearch.common.component
Class AbstractLifecycleComponent<T>

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<T>
All Implemented Interfaces:
CloseableComponent, LifecycleComponent<T>
Direct Known Subclasses:
BulkUdpService, DiscoveryService, GatewayService, HttpServer, IndexingMemoryController, IndicesClusterStateService, IndicesTTLService, InternalClusterService, InternalIndicesService, JvmMonitorService, LocalDiscovery, LocalGateway, LocalTransport, MonitorService, MulticastZenPing, NettyHttpServerTransport, NettyTransport, NoneGateway, RestController, RiverClusterService, RiversManager, RiversRouter, RiversService, RoutingService, SearchService, SharedStorageGateway, TransportService, UnicastZenPing, ZenDiscovery, ZenPingService

public abstract class AbstractLifecycleComponent<T>
extends AbstractComponent
implements LifecycleComponent<T>


Field Summary
protected  Lifecycle lifecycle
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
protected AbstractLifecycleComponent(Settings settings)
           
protected AbstractLifecycleComponent(Settings settings, Class customClass)
           
protected AbstractLifecycleComponent(Settings settings, Class loggerClass, Class componentClass)
           
protected AbstractLifecycleComponent(Settings settings, String prefixSettings)
           
protected AbstractLifecycleComponent(Settings settings, String prefixSettings, Class customClass)
           
protected AbstractLifecycleComponent(Settings settings, String prefixSettings, Class loggerClass, Class componentClass)
           
 
Method Summary
 void addLifecycleListener(LifecycleListener listener)
           
 void close()
           
protected abstract  void doClose()
           
protected abstract  void doStart()
           
protected abstract  void doStop()
           
 Lifecycle.State lifecycleState()
           
 void removeLifecycleListener(LifecycleListener listener)
           
 T start()
           
 T 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
 

Field Detail

lifecycle

protected final Lifecycle lifecycle
Constructor Detail

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings)

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings,
                                     Class customClass)

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings,
                                     Class loggerClass,
                                     Class componentClass)

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings,
                                     String prefixSettings)

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings,
                                     String prefixSettings,
                                     Class customClass)

AbstractLifecycleComponent

protected AbstractLifecycleComponent(Settings settings,
                                     String prefixSettings,
                                     Class loggerClass,
                                     Class componentClass)
Method Detail

lifecycleState

public Lifecycle.State lifecycleState()
Specified by:
lifecycleState in interface LifecycleComponent<T>

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Specified by:
addLifecycleListener in interface LifecycleComponent<T>

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Specified by:
removeLifecycleListener in interface LifecycleComponent<T>

start

public T start()
        throws ElasticSearchException
Specified by:
start in interface LifecycleComponent<T>
Throws:
ElasticSearchException

doStart

protected abstract void doStart()
                         throws ElasticSearchException
Throws:
ElasticSearchException

stop

public T stop()
       throws ElasticSearchException
Specified by:
stop in interface LifecycleComponent<T>
Throws:
ElasticSearchException

doStop

protected abstract void doStop()
                        throws ElasticSearchException
Throws:
ElasticSearchException

close

public void close()
           throws ElasticSearchException
Specified by:
close in interface CloseableComponent
Throws:
ElasticSearchException

doClose

protected abstract void doClose()
                         throws ElasticSearchException
Throws:
ElasticSearchException


Copyright © 2009-2012. All Rights Reserved.