Class ManagedLedgerClientFactory

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the storage.
      java.util.Map<org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfig,​org.apache.bookkeeper.client.BookKeeper> getBkEnsemblePolicyToBookKeeperMap()  
      org.apache.bookkeeper.client.BookKeeper getBookKeeperClient()
      Return the default bookkeeper client.
      org.apache.bookkeeper.mledger.ManagedLedgerFactory getManagedLedgerFactory()
      Return the factory to create ManagedLedgerFactory.
      org.apache.bookkeeper.stats.StatsProvider getStatsProvider()
      Return the stats provider to expose the stats of the storage implementation.
      void initialize​(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, org.apache.zookeeper.ZooKeeper zkClient, BookKeeperClientFactory bookkeeperProvider, io.netty.channel.EventLoopGroup eventLoopGroup)
      Initialize the managed ledger storage.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ManagedLedgerClientFactory

        public ManagedLedgerClientFactory()
    • Method Detail

      • initialize

        public void initialize​(org.apache.pulsar.broker.ServiceConfiguration conf,
                               org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore,
                               org.apache.zookeeper.ZooKeeper zkClient,
                               BookKeeperClientFactory bookkeeperProvider,
                               io.netty.channel.EventLoopGroup eventLoopGroup)
                        throws java.lang.Exception
        Description copied from interface: ManagedLedgerStorage
        Initialize the managed ledger storage.
        Specified by:
        initialize in interface ManagedLedgerStorage
        Parameters:
        conf - service config
        zkClient - zk client
        bookkeeperProvider - bookkeeper provider
        Throws:
        java.lang.Exception
      • getManagedLedgerFactory

        public org.apache.bookkeeper.mledger.ManagedLedgerFactory getManagedLedgerFactory()
        Description copied from interface: ManagedLedgerStorage
        Return the factory to create ManagedLedgerFactory.
        Specified by:
        getManagedLedgerFactory in interface ManagedLedgerStorage
        Returns:
        the factory to create ManagedLedgerFactory.
      • getBookKeeperClient

        public org.apache.bookkeeper.client.BookKeeper getBookKeeperClient()
        Description copied from interface: ManagedLedgerStorage
        Return the default bookkeeper client.
        Specified by:
        getBookKeeperClient in interface ManagedLedgerStorage
        Returns:
        the default bookkeeper client.
      • getStatsProvider

        public org.apache.bookkeeper.stats.StatsProvider getStatsProvider()
        Description copied from interface: ManagedLedgerStorage
        Return the stats provider to expose the stats of the storage implementation.
        Specified by:
        getStatsProvider in interface ManagedLedgerStorage
        Returns:
        the stats provider.
      • getBkEnsemblePolicyToBookKeeperMap

        public java.util.Map<org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfig,​org.apache.bookkeeper.client.BookKeeper> getBkEnsemblePolicyToBookKeeperMap()
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: ManagedLedgerStorage
        Close the storage.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface ManagedLedgerStorage
        Throws:
        java.io.IOException