Class AbstractLifecycleComponent
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractLifecycleComponent
-
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,Releasable
- Direct Known Subclasses:
BlobStoreRepository,CircuitBreakerService,ClusterApplierService,ClusterService,Coordinator,DelayedAllocationService,GatewayService,IndicesClusterStateService,IndicesService,JvmGcMonitorService,MasterService,MonitorService,NodeConnectionsService,PeerRecoverySourceService,ResourceWatcherService,SearchService,SeedHostsResolver,SnapshotShardsService,SnapshotsService,TcpTransport,TransportService,ZenDiscovery
public abstract class AbstractLifecycleComponent extends Object implements LifecycleComponent
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLifecycleComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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 Detail
-
lifecycle
protected final Lifecycle lifecycle
-
-
Method Detail
-
lifecycleState
public Lifecycle.State lifecycleState()
- Specified by:
lifecycleStatein interfaceLifecycleComponent
-
addLifecycleListener
public void addLifecycleListener(LifecycleListener listener)
- Specified by:
addLifecycleListenerin interfaceLifecycleComponent
-
removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)
- 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 interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
doClose
protected abstract void doClose() throws IOException- Throws:
IOException
-
-