Package org.apache.pulsar.broker
Class ManagedLedgerClientFactory
java.lang.Object
org.apache.pulsar.broker.ManagedLedgerClientFactory
- All Implemented Interfaces:
AutoCloseable,ManagedLedgerStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the storage.Map<org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfig,org.apache.bookkeeper.client.BookKeeper> 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.
-
Constructor Details
-
ManagedLedgerClientFactory
public ManagedLedgerClientFactory()
-
-
Method Details
-
initialize
public 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 Description copied from interface:ManagedLedgerStorageInitialize the managed ledger storage.- Specified by:
initializein interfaceManagedLedgerStorage- Parameters:
conf- service configbookkeeperProvider- bookkeeper provider- Throws:
Exception
-
getManagedLedgerFactory
public org.apache.bookkeeper.mledger.ManagedLedgerFactory getManagedLedgerFactory()Description copied from interface:ManagedLedgerStorageReturn the factory to createManagedLedgerFactory.- Specified by:
getManagedLedgerFactoryin interfaceManagedLedgerStorage- Returns:
- the factory to create
ManagedLedgerFactory.
-
getBookKeeperClient
public org.apache.bookkeeper.client.BookKeeper getBookKeeperClient()Description copied from interface:ManagedLedgerStorageReturn the default bookkeeper client.- Specified by:
getBookKeeperClientin interfaceManagedLedgerStorage- Returns:
- the default bookkeeper client.
-
getStatsProvider
public org.apache.bookkeeper.stats.StatsProvider getStatsProvider()Description copied from interface:ManagedLedgerStorageReturn the stats provider to expose the stats of the storage implementation.- Specified by:
getStatsProviderin interfaceManagedLedgerStorage- Returns:
- the stats provider.
-
getBkEnsemblePolicyToBookKeeperMap
public Map<org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfig,org.apache.bookkeeper.client.BookKeeper> getBkEnsemblePolicyToBookKeeperMap() -
close
Description copied from interface:ManagedLedgerStorageClose the storage.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceManagedLedgerStorage- Throws:
IOException
-