Class MetaStoreImpl
- java.lang.Object
-
- org.apache.bookkeeper.mledger.impl.MetaStoreImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.bookkeeper.mledger.impl.MetaStore
MetaStore.MetaStoreCallback<T>, MetaStore.UpdateLedgersIdsCallback
-
-
Constructor Summary
Constructors Constructor Description MetaStoreImpl(org.apache.pulsar.metadata.api.MetadataStore store, org.apache.bookkeeper.common.util.OrderedExecutor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidasyncGetCursorInfo(java.lang.String ledgerName, java.lang.String cursorName, MetaStore.MetaStoreCallback<MLDataFormats.ManagedCursorInfo> callback)Get the ledger id associated with a cursor.voidasyncRemoveCursor(java.lang.String ledgerName, java.lang.String cursorName, MetaStore.MetaStoreCallback<java.lang.Void> callback)Drop the persistent state of a consumer from the metadata store.voidasyncUpdateCursorInfo(java.lang.String ledgerName, java.lang.String cursorName, MLDataFormats.ManagedCursorInfo info, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<java.lang.Void> callback)Update the persisted position of a cursor.voidasyncUpdateLedgerIds(java.lang.String ledgerName, MLDataFormats.ManagedLedgerInfo mlInfo, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<java.lang.Void> callback)voidgetCursors(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.util.List<java.lang.String>> callback)Get the list of cursors registered on a ManagedLedger.voidgetManagedLedgerInfo(java.lang.String ledgerName, boolean createIfMissing, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback)Get the metadata used by the ManagedLedger.java.lang.Iterable<java.lang.String>getManagedLedgers()Get a list of all the managed ledgers in the system.voidremoveManagedLedger(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.lang.Void> callback)Drop the persistent state for the ManagedLedger and all its associated consumers.
-
-
-
Method Detail
-
getManagedLedgerInfo
public void getManagedLedgerInfo(java.lang.String ledgerName, boolean createIfMissing, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback)Description copied from interface:MetaStoreGet the metadata used by the ManagedLedger.- Specified by:
getManagedLedgerInfoin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedgercreateIfMissing- 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:
asyncUpdateLedgerIdsin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedgermlInfo- managed ledger infostat- version object associated with current statecallback- callback object
-
getCursors
public void getCursors(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.util.List<java.lang.String>> callback)Description copied from interface:MetaStoreGet the list of cursors registered on a ManagedLedger.- Specified by:
getCursorsin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedger
-
asyncGetCursorInfo
public void asyncGetCursorInfo(java.lang.String ledgerName, java.lang.String cursorName, MetaStore.MetaStoreCallback<MLDataFormats.ManagedCursorInfo> callback)Description copied from interface:MetaStoreGet the ledger id associated with a cursor. This ledger id will contains the mark-deleted position for the cursor.- Specified by:
asyncGetCursorInfoin interfaceMetaStore
-
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:MetaStoreUpdate the persisted position of a cursor.- Specified by:
asyncUpdateCursorInfoin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedgercallback- the callback
-
asyncRemoveCursor
public void asyncRemoveCursor(java.lang.String ledgerName, java.lang.String cursorName, MetaStore.MetaStoreCallback<java.lang.Void> callback)Description copied from interface:MetaStoreDrop the persistent state of a consumer from the metadata store.- Specified by:
asyncRemoveCursorin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedgercursorName- the cursor namecallback- callback object
-
removeManagedLedger
public void removeManagedLedger(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.lang.Void> callback)Description copied from interface:MetaStoreDrop the persistent state for the ManagedLedger and all its associated consumers.- Specified by:
removeManagedLedgerin interfaceMetaStore- Parameters:
ledgerName- the name of the ManagedLedgercallback- callback object
-
getManagedLedgers
public java.lang.Iterable<java.lang.String> getManagedLedgers() throws ManagedLedgerException.MetaStoreExceptionDescription copied from interface:MetaStoreGet a list of all the managed ledgers in the system.- Specified by:
getManagedLedgersin interfaceMetaStore- Returns:
- an Iterable of the names of the managed ledgers
- Throws:
ManagedLedgerException.MetaStoreException
-
-