Interface MetaStore
-
- All Known Implementing Classes:
MetaStoreImpl
public interface MetaStoreInterface that describes the operations that the ManagedLedger need to do on the metadata store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMetaStore.MetaStoreCallback<T>static interfaceMetaStore.UpdateLedgersIdsCallback
-
Method Summary
All Methods Instance Methods Abstract 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
void getManagedLedgerInfo(java.lang.String ledgerName, boolean createIfMissing, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback)Get the metadata used by the ManagedLedger.- Parameters:
ledgerName- the name of the ManagedLedgercreateIfMissing- whether the managed ledger metadata should be created if it doesn't exist already- Throws:
ManagedLedgerException.MetaStoreException
-
asyncUpdateLedgerIds
void asyncUpdateLedgerIds(java.lang.String ledgerName, MLDataFormats.ManagedLedgerInfo mlInfo, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<java.lang.Void> callback)- Parameters:
ledgerName- the name of the ManagedLedgermlInfo- managed ledger infostat- version object associated with current statecallback- callback object
-
getCursors
void getCursors(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.util.List<java.lang.String>> callback)Get the list of cursors registered on a ManagedLedger.- Parameters:
ledgerName- the name of the ManagedLedger
-
asyncGetCursorInfo
void asyncGetCursorInfo(java.lang.String ledgerName, java.lang.String cursorName, MetaStore.MetaStoreCallback<MLDataFormats.ManagedCursorInfo> callback)Get the ledger id associated with a cursor. This ledger id will contains the mark-deleted position for the cursor.- Parameters:
ledgerName-cursorName-callback-
-
asyncUpdateCursorInfo
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)Update the persisted position of a cursor.- Parameters:
ledgerName- the name of the ManagedLedgercursorName-info-stat-callback- the callback- Throws:
ManagedLedgerException.MetaStoreException
-
asyncRemoveCursor
void asyncRemoveCursor(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.- Parameters:
ledgerName- the name of the ManagedLedgercursorName- the cursor namecallback- callback object
-
removeManagedLedger
void removeManagedLedger(java.lang.String ledgerName, MetaStore.MetaStoreCallback<java.lang.Void> callback)Drop the persistent state for the ManagedLedger and all its associated consumers.- Parameters:
ledgerName- the name of the ManagedLedgercallback- callback object
-
getManagedLedgers
java.lang.Iterable<java.lang.String> getManagedLedgers() throws ManagedLedgerException.MetaStoreExceptionGet a list of all the managed ledgers in the system.- Returns:
- an Iterable of the names of the managed ledgers
- Throws:
ManagedLedgerException.MetaStoreException
-
-