Class AbstractLifecycleComponent
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
- All Implemented Interfaces:
Closeable
,AutoCloseable
,LifecycleComponent
,org.elasticsearch.core.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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLifecycleListener(LifecycleListener listener)
void
close()
protected abstract void
doClose()
protected abstract void
doStart()
protected abstract void
doStop()
void
removeLifecycleListener(LifecycleListener listener)
void
start()
void
stop()
-
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.elasticsearch.core.Releasable
-
doClose
- Throws:
IOException
-