Package org.apache.pulsar.broker.storage
Interface ManagedLedgerStorage
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ManagedLedgerClientFactory
Storage to access
ManagedLedgers.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.BookKeeperReturn the default bookkeeper client.org.apache.bookkeeper.mledger.ManagedLedgerFactoryReturn the factory to createManagedLedgerFactory.org.apache.bookkeeper.stats.StatsProviderReturn 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 Details
-
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 Exception Initialize the managed ledger storage.- Parameters:
conf- service configbookkeeperProvider- bookkeeper provider- Throws:
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
Close the storage.- Specified by:
closein interfaceAutoCloseable- Throws:
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 Exception Initialize theManagedLedgerStoragefrom the provided resources.- Parameters:
conf- service configbkProvider- bookkeeper client provider- Returns:
- the initialized managed ledger storage.
- Throws:
Exception
-