接口 MetaStore
- 所有已知实现类:
MetaStoreImpl
public interface MetaStore
Interface that describes the operations that the ManagedLedger need to do on the metadata store.
-
嵌套类概要
嵌套类修饰符和类型接口说明static interfacestatic interface -
方法概要
修饰符和类型方法说明asyncExists(String ledgerName) Check ledger exists.voidasyncGetCursorInfo(String ledgerName, String cursorName, MetaStore.MetaStoreCallback<MLDataFormats.ManagedCursorInfo> callback) Get the ledger id associated with a cursor.voidasyncRemoveCursor(String ledgerName, String cursorName, MetaStore.MetaStoreCallback<Void> callback) Drop the persistent state of a consumer from the metadata store.voidasyncUpdateCursorInfo(String ledgerName, String cursorName, MLDataFormats.ManagedCursorInfo info, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<Void> callback) Update the persisted position of a cursor.voidasyncUpdateLedgerIds(String ledgerName, MLDataFormats.ManagedLedgerInfo mlInfo, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<Void> callback) voidgetCursors(String ledgerName, MetaStore.MetaStoreCallback<List<String>> callback) Get the list of cursors registered on a ManagedLedger.voidgetManagedLedgerInfo(String ledgerName, boolean createIfMissing, Map<String, String> properties, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback) Get the metadata used by the ManagedLedger.default voidgetManagedLedgerInfo(String ledgerName, boolean createIfMissing, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback) Get the metadata used by the ManagedLedger.Get a list of all the managed ledgers in the system.voidremoveManagedLedger(String ledgerName, MetaStore.MetaStoreCallback<Void> callback) Drop the persistent state for the ManagedLedger and all its associated consumers.
-
方法详细资料
-
getManagedLedgerInfo
default void getManagedLedgerInfo(String ledgerName, boolean createIfMissing, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback) Get the metadata used by the ManagedLedger.- 参数:
ledgerName- the name of the ManagedLedgercreateIfMissing- whether the managed ledger metadata should be created if it doesn't exist already- 抛出:
ManagedLedgerException.MetaStoreException
-
getManagedLedgerInfo
void getManagedLedgerInfo(String ledgerName, boolean createIfMissing, Map<String, String> properties, MetaStore.MetaStoreCallback<MLDataFormats.ManagedLedgerInfo> callback) Get the metadata used by the ManagedLedger.- 参数:
ledgerName- the name of the ManagedLedgercreateIfMissing- whether the managed ledger metadata should be created if it doesn't exist alreadyproperties- ledger properties- 抛出:
ManagedLedgerException.MetaStoreException
-
asyncUpdateLedgerIds
void asyncUpdateLedgerIds(String ledgerName, MLDataFormats.ManagedLedgerInfo mlInfo, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<Void> callback) - 参数:
ledgerName- the name of the ManagedLedgermlInfo- managed ledger infostat- version object associated with current statecallback- callback object
-
getCursors
Get the list of cursors registered on a ManagedLedger.- 参数:
ledgerName- the name of the ManagedLedger
-
asyncGetCursorInfo
void asyncGetCursorInfo(String ledgerName, 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.- 参数:
ledgerName-cursorName-callback-
-
asyncUpdateCursorInfo
void asyncUpdateCursorInfo(String ledgerName, String cursorName, MLDataFormats.ManagedCursorInfo info, org.apache.pulsar.metadata.api.Stat stat, MetaStore.MetaStoreCallback<Void> callback) Update the persisted position of a cursor.- 参数:
ledgerName- the name of the ManagedLedgercursorName-info-stat-callback- the callback- 抛出:
ManagedLedgerException.MetaStoreException
-
asyncRemoveCursor
void asyncRemoveCursor(String ledgerName, String cursorName, MetaStore.MetaStoreCallback<Void> callback) Drop the persistent state of a consumer from the metadata store.- 参数:
ledgerName- the name of the ManagedLedgercursorName- the cursor namecallback- callback object
-
removeManagedLedger
Drop the persistent state for the ManagedLedger and all its associated consumers.- 参数:
ledgerName- the name of the ManagedLedgercallback- callback object
-
getManagedLedgers
Get a list of all the managed ledgers in the system.- 返回:
- an Iterable of the names of the managed ledgers
- 抛出:
ManagedLedgerException.MetaStoreException
-
asyncExists
Check ledger exists.
-