Class AbstractLifecycleComponent
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.common.component.AbstractLifecycleComponent
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
- Direct Known Subclasses:
BlobStoreRepository
,CircuitBreakerService
,ClusterApplierService
,ClusterService
,DelayedAllocationService
,GatewayService
,IndicesClusterStateService
,IndicesService
,JvmGcMonitorService
,MasterService
,MonitorService
,NodeConnectionsService
,ResourceWatcherService
,RoutingService
,SearchService
,SingleNodeDiscovery
,SnapshotShardsService
,SnapshotsService
,TcpTransport
,TransportService
,ZenDiscovery
public abstract class AbstractLifecycleComponent extends AbstractComponent implements LifecycleComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected Lifecycle
lifecycle
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLifecycleComponent(Settings settings)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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)
void
start()
void
stop()
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
-
-
-
-
Field Detail
-
lifecycle
protected final Lifecycle lifecycle
-
-
Constructor Detail
-
AbstractLifecycleComponent
protected AbstractLifecycleComponent(Settings settings)
-
-
Method Detail
-
lifecycleState
public Lifecycle.State lifecycleState()
- Specified by:
lifecycleState
in interfaceLifecycleComponent
-
addLifecycleListener
public void addLifecycleListener(LifecycleListener listener)
- Specified by:
addLifecycleListener
in interfaceLifecycleComponent
-
removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)
- Specified by:
removeLifecycleListener
in interfaceLifecycleComponent
-
start
public void start()
- Specified by:
start
in interfaceLifecycleComponent
-
doStart
protected abstract void doStart()
-
stop
public void stop()
- Specified by:
stop
in interfaceLifecycleComponent
-
doStop
protected abstract void doStop()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceReleasable
-
doClose
protected abstract void doClose() throws java.io.IOException
- Throws:
java.io.IOException
-
-