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:
java.lang.AutoCloseable
,LifecycleComponent
public class BookieService extends ServerLifecycleComponent
AServerLifecycleComponent
that starts the core bookie server.
-
-
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 BookieService(BookieConfiguration conf, Bookie bookie, StatsLogger statsLogger, ByteBufAllocatorWithOomHandler allocator, UncleanShutdownDetection uncleanShutdownDetection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doClose()
protected void
doStart()
protected void
doStop()
BookieServer
getServer()
void
publishInfo(ComponentInfoPublisher componentInfoPublisher)
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
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BookieService
public BookieService(BookieConfiguration conf, Bookie bookie, StatsLogger statsLogger, ByteBufAllocatorWithOomHandler allocator, UncleanShutdownDetection uncleanShutdownDetection) 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.
-
getServer
public BookieServer getServer()
-
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
-
publishInfo
public void publishInfo(ComponentInfoPublisher componentInfoPublisher)
-
-