Interface ManagedLedgerStorage

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ManagedLedgerClientFactory

@Private @Unstable public interface ManagedLedgerStorage extends AutoCloseable
Storage to access ManagedLedgers.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the storage.
    create(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.metadata.api.extended.MetadataStoreExtended metadataStore, BookKeeperClientFactory bkProvider, io.netty.channel.EventLoopGroup eventLoopGroup)
    Initialize the ManagedLedgerStorage from the provided resources.
    org.apache.bookkeeper.client.BookKeeper
    Return the default bookkeeper client.
    org.apache.bookkeeper.mledger.ManagedLedgerFactory
    Return the factory to create ManagedLedgerFactory.
    org.apache.bookkeeper.stats.StatsProvider
    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, 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 config
      bookkeeperProvider - bookkeeper provider
      Throws:
      Exception
    • getManagedLedgerFactory

      org.apache.bookkeeper.mledger.ManagedLedgerFactory getManagedLedgerFactory()
      Return the factory to create ManagedLedgerFactory.
      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 IOException
      Close the storage.
      Specified by:
      close in interface AutoCloseable
      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 the ManagedLedgerStorage from the provided resources.
      Parameters:
      conf - service config
      bkProvider - bookkeeper client provider
      Returns:
      the initialized managed ledger storage.
      Throws:
      Exception