Class BookieService
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.BookieService
- All Implemented Interfaces:
AutoCloseable,LifecycleComponent
A
ServerLifecycleComponent that starts the core bookie server.-
Field Summary
FieldsFields inherited from class org.apache.bookkeeper.common.component.AbstractLifecycleComponent
lifecycle, statsLogger, uncaughtExceptionHandlerFields inherited from class org.apache.bookkeeper.common.component.AbstractComponent
componentName, conf -
Constructor Summary
ConstructorsConstructorDescriptionBookieService(BookieConfiguration conf, Bookie bookie, StatsLogger statsLogger, ByteBufAllocatorWithOomHandler allocator, UncleanShutdownDetection uncleanShutdownDetection) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()protected voiddoStart()protected voiddoStop()voidpublishInfo(ComponentInfoPublisher componentInfoPublisher) voidSet the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.Methods inherited from class org.apache.bookkeeper.server.component.ServerLifecycleComponent
loadServerComponentsMethods inherited from class org.apache.bookkeeper.common.component.AbstractLifecycleComponent
addLifecycleListener, close, getStatsLogger, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class org.apache.bookkeeper.common.component.AbstractComponent
getConf, getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.bookkeeper.common.component.LifecycleComponent
getName
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
BookieService
public BookieService(BookieConfiguration conf, Bookie bookie, StatsLogger statsLogger, ByteBufAllocatorWithOomHandler allocator, UncleanShutdownDetection uncleanShutdownDetection) throws Exception - Throws:
Exception
-
-
Method Details
-
setExceptionHandler
Description copied from interface:LifecycleComponentSet the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.- Specified by:
setExceptionHandlerin interfaceLifecycleComponent- Overrides:
setExceptionHandlerin classAbstractLifecycleComponent<BookieConfiguration>- Parameters:
handler- handler invoked when an uncaught exception happens in the lifecycle component.
-
getServer
-
doStart
protected void doStart()- Specified by:
doStartin classAbstractLifecycleComponent<BookieConfiguration>
-
doStop
protected void doStop()- Specified by:
doStopin classAbstractLifecycleComponent<BookieConfiguration>
-
doClose
- Specified by:
doClosein classAbstractLifecycleComponent<BookieConfiguration>- Throws:
IOException
-
publishInfo
-