Class AbstractLifecycleComponent
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable
- Direct Known Subclasses:
AbstractHttpServerTransport,BlobStoreRepository,CircuitBreakerService,ClusterApplierService,ClusterService,Coordinator,DelayedAllocationService,GatewayService,IndicesClusterStateService,IndicesService,JvmGcMonitorService,MasterService,MonitorService,NodeConnectionsService,PeerRecoverySourceService,RepositoriesService,SearchService,SeedHostsResolver,SnapshotShardsService,SnapshotsService,TcpTransport,TransportService,ZenDiscovery
public abstract class AbstractLifecycleComponent extends java.lang.Object implements LifecycleComponent
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLifecycleComponent() -
Method Summary
Modifier and Type Method Description voidaddLifecycleListener(LifecycleListener listener)voidclose()protected abstract voiddoClose()protected abstract voiddoStart()protected abstract voiddoStop()Lifecycle.StatelifecycleState()voidremoveLifecycleListener(LifecycleListener listener)voidstart()voidstop()
-
Field Details
-
Constructor Details
-
AbstractLifecycleComponent
protected AbstractLifecycleComponent()
-
-
Method Details
-
lifecycleState
- Specified by:
lifecycleStatein interfaceLifecycleComponent
-
addLifecycleListener
- Specified by:
addLifecycleListenerin interfaceLifecycleComponent
-
removeLifecycleListener
- Specified by:
removeLifecycleListenerin interfaceLifecycleComponent
-
start
public void start()- Specified by:
startin interfaceLifecycleComponent
-
doStart
protected abstract void doStart() -
stop
public void stop()- Specified by:
stopin interfaceLifecycleComponent
-
doStop
protected abstract void doStop() -
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceReleasable
-
doClose
protected abstract void doClose() throws java.io.IOException- Throws:
java.io.IOException
-