java.io.Closeable
, java.lang.AutoCloseable
, LifecycleComponent
, Releasable
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
Modifier and Type | Field | Description |
---|---|---|
protected Lifecycle |
lifecycle |
deprecationLogger, logger, settings
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractLifecycleComponent(Settings settings) |
|
protected |
AbstractLifecycleComponent(Settings settings,
java.lang.Class customClass) |
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() |
logDeprecatedSetting, logRemovedSetting, nodeName
protected final Lifecycle lifecycle
protected AbstractLifecycleComponent(Settings settings)
protected AbstractLifecycleComponent(Settings settings, java.lang.Class customClass)
public Lifecycle.State lifecycleState()
lifecycleState
in interface LifecycleComponent
public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface LifecycleComponent
public void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface LifecycleComponent
public void start()
start
in interface LifecycleComponent
protected abstract void doStart()
public void stop()
stop
in interface LifecycleComponent
protected abstract void doStop()
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
close
in interface Releasable
protected abstract void doClose() throws java.io.IOException
java.io.IOException