org.elasticsearch.common.component
Class AbstractLifecycleComponent<T>
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.common.component.AbstractLifecycleComponent<T>
- All Implemented Interfaces:
- CloseableComponent, LifecycleComponent<T>
- Direct Known Subclasses:
- BlobStoreGateway, DiscoveryService, GatewayService, HttpServer, IndicesClusterStateService, InternalClusterService, InternalIndicesService, JvmMonitorService, LocalDiscovery, LocalTransport, MonitorService, MulticastZenPing, NettyHttpServerTransport, NettyTransport, NoneGateway, RestController, RoutingService, SearchService, TransportService, UnicastZenPing, ZenDiscovery, ZenPingService
public abstract class AbstractLifecycleComponent<T>
- extends AbstractComponent
- implements LifecycleComponent<T>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lifecycle
protected final Lifecycle lifecycle
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings)
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings,
java.lang.Class customClass)
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings,
java.lang.Class loggerClass,
java.lang.Class componentClass)
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings,
java.lang.String prefixSettings)
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings,
java.lang.String prefixSettings,
java.lang.Class customClass)
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings,
java.lang.String prefixSettings,
java.lang.Class loggerClass,
java.lang.Class componentClass)
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