Interface LifecycleComponent
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
AbstractLifecycleComponent,AutoCloseableLifecycleComponent,AutoRecoveryService,BookieService,DataIntegrityService,HttpService,LifecycleComponentStack,RxSchedulerLifecycleComponent,ScrubberService,ServerLifecycleComponent,StatsProviderService
public interface LifecycleComponent extends java.lang.AutoCloseableA component based on lifecycle management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddLifecycleListener(LifecycleListener listener)voidclose()java.lang.StringgetName()Lifecycle.StatelifecycleState()default voidpublishInfo(ComponentInfoPublisher componentInfoPublisher)voidremoveLifecycleListener(LifecycleListener listener)voidsetExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.voidstart()voidstop()
-
-
-
Method Detail
-
getName
java.lang.String getName()
-
lifecycleState
Lifecycle.State lifecycleState()
-
addLifecycleListener
void addLifecycleListener(LifecycleListener listener)
-
removeLifecycleListener
void removeLifecycleListener(LifecycleListener listener)
-
publishInfo
default void publishInfo(ComponentInfoPublisher componentInfoPublisher)
-
start
void start()
-
stop
void stop()
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
setExceptionHandler
void setExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)
Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.- Parameters:
handler- handler invoked when an uncaught exception happens in the lifecycle component.
-
-