Class AbstractLifecycleComponent
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,org.elasticsearch.common.lease.Releasable
- Direct Known Subclasses:
AbstractHttpServerTransport
,BlobStoreRepository
,CircuitBreakerService
,ClusterApplierService
,ClusterService
,Coordinator
,DelayedAllocationService
,FsHealthService
,GatewayService
,IndicesClusterStateService
,IndicesService
,JvmGcMonitorService
,MasterService
,MonitorService
,NodeConnectionsService
,PeerRecoverySourceService
,RepositoriesService
,SearchService
,SeedHostsResolver
,SnapshotShardsService
,SnapshotsService
,TcpTransport
,TimestampFieldMapperService
,TransportService
,ZenDiscovery
public abstract class AbstractLifecycleComponent extends java.lang.Object implements LifecycleComponent
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLifecycleComponent()
-
Method Summary
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
lifecycle
-
-
Constructor Details
-
AbstractLifecycleComponent
protected AbstractLifecycleComponent()
-
-
Method Details
-
lifecycleState
- Specified by:
lifecycleState
in interfaceLifecycleComponent
-
addLifecycleListener
- Specified by:
addLifecycleListener
in interfaceLifecycleComponent
-
removeLifecycleListener
- 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 interfaceorg.elasticsearch.common.lease.Releasable
-
doClose
protected abstract void doClose() throws java.io.IOException- Throws:
java.io.IOException
-