Package org.apache.bookkeeper.bookie
Class BookieResources
- java.lang.Object
-
- org.apache.bookkeeper.bookie.BookieResources
-
public class BookieResources extends java.lang.Object
Centralizes the creation of injected resources.
-
-
Constructor Summary
Constructors Constructor Description BookieResources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ByteBufAllocatorWithOomHandler
createAllocator(ServerConfiguration conf)
static DiskChecker
createDiskChecker(ServerConfiguration conf)
static LedgerDirsManager
createIndexDirsManager(ServerConfiguration conf, DiskChecker diskChecker, StatsLogger statsLogger, LedgerDirsManager fallback)
static LedgerDirsManager
createLedgerDirsManager(ServerConfiguration conf, DiskChecker diskChecker, StatsLogger statsLogger)
static LedgerStorage
createLedgerStorage(ServerConfiguration conf, LedgerManager ledgerManager, LedgerDirsManager ledgerDirsManager, LedgerDirsManager indexDirsManager, StatsLogger statsLogger, io.netty.buffer.ByteBufAllocator allocator)
static MetadataBookieDriver
createMetadataDriver(ServerConfiguration conf, StatsLogger statsLogger)
Instantiate the metadata driver for the Bookie.
-
-
-
Method Detail
-
createMetadataDriver
public static MetadataBookieDriver createMetadataDriver(ServerConfiguration conf, StatsLogger statsLogger) throws BookieException
Instantiate the metadata driver for the Bookie.- Throws:
BookieException
-
createAllocator
public static ByteBufAllocatorWithOomHandler createAllocator(ServerConfiguration conf)
-
createDiskChecker
public static DiskChecker createDiskChecker(ServerConfiguration conf)
-
createLedgerDirsManager
public static LedgerDirsManager createLedgerDirsManager(ServerConfiguration conf, DiskChecker diskChecker, StatsLogger statsLogger) throws java.io.IOException
- Throws:
java.io.IOException
-
createIndexDirsManager
public static LedgerDirsManager createIndexDirsManager(ServerConfiguration conf, DiskChecker diskChecker, StatsLogger statsLogger, LedgerDirsManager fallback) throws java.io.IOException
- Throws:
java.io.IOException
-
createLedgerStorage
public static LedgerStorage createLedgerStorage(ServerConfiguration conf, LedgerManager ledgerManager, LedgerDirsManager ledgerDirsManager, LedgerDirsManager indexDirsManager, StatsLogger statsLogger, io.netty.buffer.ByteBufAllocator allocator) throws java.io.IOException
- Throws:
java.io.IOException
-
-