Package org.apache.pulsar.broker.storage
Interface ManagedLedgerStorage
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
ManagedLedgerClientFactory
@Private @Unstable public interface ManagedLedgerStorage extends java.lang.AutoCloseableStorage to accessManagedLedgers.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the storage.static ManagedLedgerStoragecreate(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, BookKeeperClientFactory bkProvider, io.netty.channel.EventLoopGroup eventLoopGroup)Initialize theManagedLedgerStoragefrom the provided resources.org.apache.bookkeeper.client.BookKeepergetBookKeeperClient()Return the default bookkeeper client.org.apache.bookkeeper.mledger.ManagedLedgerFactorygetManagedLedgerFactory()Return the factory to createManagedLedgerFactory.org.apache.bookkeeper.stats.StatsProvidergetStatsProvider()Return the stats provider to expose the stats of the storage implementation.voidinitialize(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, BookKeeperClientFactory bookkeeperProvider, io.netty.channel.EventLoopGroup eventLoopGroup)Initialize the managed ledger storage.
-
-
-
Method Detail
-
initialize
void initialize(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, BookKeeperClientFactory bookkeeperProvider, io.netty.channel.EventLoopGroup eventLoopGroup) throws java.lang.ExceptionInitialize the managed ledger storage.- Parameters:
conf- service configbookkeeperProvider- bookkeeper provider- Throws:
java.lang.Exception
-
getManagedLedgerFactory
org.apache.bookkeeper.mledger.ManagedLedgerFactory getManagedLedgerFactory()
Return the factory to createManagedLedgerFactory.- Returns:
- the factory to create
ManagedLedgerFactory.
-
getStatsProvider
org.apache.bookkeeper.stats.StatsProvider getStatsProvider()
Return the stats provider to expose the stats of the storage implementation.- Returns:
- the stats provider.
-
getBookKeeperClient
org.apache.bookkeeper.client.BookKeeper getBookKeeperClient()
Return the default bookkeeper client.- Returns:
- the default bookkeeper client.
-
close
void close() throws java.io.IOExceptionClose the storage.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
create
static ManagedLedgerStorage create(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, BookKeeperClientFactory bkProvider, io.netty.channel.EventLoopGroup eventLoopGroup) throws java.lang.Exception
Initialize theManagedLedgerStoragefrom the provided resources.- Parameters:
conf- service configbkProvider- bookkeeper client provider- Returns:
- the initialized managed ledger storage.
- Throws:
java.lang.Exception
-
-