Class AutoRecoveryService
- java.lang.Object
-
- org.apache.bookkeeper.common.component.AbstractComponent<ConfT>
-
- org.apache.bookkeeper.common.component.AbstractLifecycleComponent<BookieConfiguration>
-
- org.apache.bookkeeper.server.component.ServerLifecycleComponent
-
- org.apache.bookkeeper.server.service.AutoRecoveryService
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,LifecycleComponent
public class AutoRecoveryService extends ServerLifecycleComponent
AServerLifecycleComponent
that runs autorecovery.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
-
Fields inherited from class org.apache.bookkeeper.common.component.AbstractLifecycleComponent
lifecycle, statsLogger, uncaughtExceptionHandler
-
Fields inherited from class org.apache.bookkeeper.common.component.AbstractComponent
componentName, conf
-
-
Constructor Summary
Constructors Constructor Description AutoRecoveryService(BookieConfiguration conf, StatsLogger statsLogger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doClose()
protected void
doStart()
protected void
doStop()
AutoRecoveryMain
getAutoRecoveryServer()
void
setExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)
Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.-
Methods inherited from class org.apache.bookkeeper.server.component.ServerLifecycleComponent
loadServerComponents
-
Methods inherited from class org.apache.bookkeeper.common.component.AbstractLifecycleComponent
addLifecycleListener, close, getStatsLogger, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from class org.apache.bookkeeper.common.component.AbstractComponent
getConf, getName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.bookkeeper.common.component.LifecycleComponent
getName, publishInfo
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AutoRecoveryService
public AutoRecoveryService(BookieConfiguration conf, StatsLogger statsLogger) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
setExceptionHandler
public void setExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)
Description copied from interface:LifecycleComponent
Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.- Specified by:
setExceptionHandler
in interfaceLifecycleComponent
- Overrides:
setExceptionHandler
in classAbstractLifecycleComponent<BookieConfiguration>
- Parameters:
handler
- handler invoked when an uncaught exception happens in the lifecycle component.
-
getAutoRecoveryServer
public AutoRecoveryMain getAutoRecoveryServer()
-
doStart
protected void doStart()
- Specified by:
doStart
in classAbstractLifecycleComponent<BookieConfiguration>
-
doStop
protected void doStop()
- Specified by:
doStop
in classAbstractLifecycleComponent<BookieConfiguration>
-
doClose
protected void doClose() throws java.io.IOException
- Specified by:
doClose
in classAbstractLifecycleComponent<BookieConfiguration>
- Throws:
java.io.IOException
-
-