Class MetaStoreImpl

  • All Implemented Interfaces:
    MetaStore

    public class MetaStoreImpl
    extends java.lang.Object
    implements MetaStore
    • Constructor Detail

      • MetaStoreImpl

        public MetaStoreImpl​(org.apache.pulsar.metadata.api.MetadataStore store,
                             org.apache.bookkeeper.common.util.OrderedExecutor executor)
    • Method Detail

      • getManagedLedgerInfo

        public void getManagedLedgerInfo​(java.lang.String ledgerName,
                                         boolean createIfMissing,
                                         MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback)
        Description copied from interface: MetaStore
        Get the metadata used by the ManagedLedger.
        Specified by:
        getManagedLedgerInfo in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
        createIfMissing - whether the managed ledger metadata should be created if it doesn't exist already
      • asyncUpdateLedgerIds

        public void asyncUpdateLedgerIds​(java.lang.String ledgerName,
                                         MLDataFormats.ManagedLedgerInfo mlInfo,
                                         org.apache.pulsar.metadata.api.Stat stat,
                                         MetaStore.MetaStoreCallback<java.lang.Void> callback)
        Specified by:
        asyncUpdateLedgerIds in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
        mlInfo - managed ledger info
        stat - version object associated with current state
        callback - callback object
      • getCursors

        public void getCursors​(java.lang.String ledgerName,
                               MetaStore.MetaStoreCallback<java.util.List<java.lang.String>> callback)
        Description copied from interface: MetaStore
        Get the list of cursors registered on a ManagedLedger.
        Specified by:
        getCursors in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
      • asyncUpdateCursorInfo

        public void asyncUpdateCursorInfo​(java.lang.String ledgerName,
                                          java.lang.String cursorName,
                                          MLDataFormats.ManagedCursorInfo info,
                                          org.apache.pulsar.metadata.api.Stat stat,
                                          MetaStore.MetaStoreCallback<java.lang.Void> callback)
        Description copied from interface: MetaStore
        Update the persisted position of a cursor.
        Specified by:
        asyncUpdateCursorInfo in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
        callback - the callback
      • asyncRemoveCursor

        public void asyncRemoveCursor​(java.lang.String ledgerName,
                                      java.lang.String cursorName,
                                      MetaStore.MetaStoreCallback<java.lang.Void> callback)
        Description copied from interface: MetaStore
        Drop the persistent state of a consumer from the metadata store.
        Specified by:
        asyncRemoveCursor in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
        cursorName - the cursor name
        callback - callback object
      • removeManagedLedger

        public void removeManagedLedger​(java.lang.String ledgerName,
                                        MetaStore.MetaStoreCallback<java.lang.Void> callback)
        Description copied from interface: MetaStore
        Drop the persistent state for the ManagedLedger and all its associated consumers.
        Specified by:
        removeManagedLedger in interface MetaStore
        Parameters:
        ledgerName - the name of the ManagedLedger
        callback - callback object