public class ReadOnlyCursorImpl extends ManagedCursorImpl implements ReadOnlyCursor
ManagedCursorImpl.VoidCallbackManagedCursor.FindPositionConstraint, ManagedCursor.IndividualDeletedEntriesbookkeeper, config, FALSE, LAST_MARK_DELETE_ENTRY_UPDATER, lastMarkDeleteEntry, ledger, markDeletePosition, mbean, messagesConsumedCounter, pendingMarkDeleteOps, persistentMarkDeletePosition, READ_POSITION_UPDATER, readPosition, state, statsLastReadPosition, TRUE, WAITING_READ_OP_UPDATER| Constructor and Description |
|---|
ReadOnlyCursorImpl(BookKeeper bookkeeper,
ManagedLedgerConfig config,
ManagedLedgerImpl ledger,
PositionImpl startPosition,
String cursorName) |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncClose(AsyncCallbacks.CloseCallback callback,
Object ctx)
Close the cursor asynchronously and release the associated resources.
|
MLDataFormats.ManagedLedgerInfo.LedgerInfo |
getCurrentLedgerInfo() |
long |
getNumberOfEntries(com.google.common.collect.Range<PositionImpl> range)
Return the number of messages that this cursor still has to read.
|
void |
skipEntries(int numEntriesToSkip)
Skip n entries from the read position of this cursor.
|
asyncClearBacklog, asyncDelete, asyncDelete, asyncFindNewestMatching, asyncGetNthEntry, asyncMarkDelete, asyncMarkDelete, asyncReadEntries, asyncReadEntries, asyncReadEntriesOrWait, asyncReadEntriesOrWait, asyncReplayEntries, asyncReplayEntries, asyncResetCursor, asyncSkipEntries, cancelPendingReadRequest, checkAndUpdateReadPositionChanged, clearBacklog, close, delete, delete, findNewestMatching, findNewestMatching, getBatchPositionAckSet, getCursorLedger, getCursorLedgerLastEntry, getDeletedBatchIndexesAsLongArray, getEstimatedSizeSinceMarkDeletePosition, getFirstPosition, getIndividuallyDeletedMessages, getIndividuallyDeletedMessagesSet, getLastActive, getLastIndividualDeletedRange, getLastLedgerSwitchTimestamp, getManagedLedger, getMarkDeletedPosition, getMessagesConsumedCounter, getName, getNextAvailablePosition, getNextLedgerPosition, getNonContiguousDeletedMessagesRangeSerializedSize, getNthEntry, getNumberOfEntries, getNumberOfEntriesInBacklog, getNumberOfEntriesInStorage, getNumberOfEntriesSinceFirstNotAckedMessage, getPendingReadOpsCount, getPersistentMarkDeletedPosition, getProperties, getReadPosition, getState, getStats, getThrottleMarkDelete, getTotalNonContiguousDeletedMessagesRange, hasMoreEntries, hasPendingReadRequest, internalAsyncMarkDelete, internalResetCursor, isActive, isBkErrorNotRecoverable, isClosed, isDurable, isIndividuallyDeletedEntriesEmpty, isMessageDeleted, markDelete, markDelete, readEntries, readEntriesOrWait, readEntriesOrWait, recoverFromLedger, replayEntries, resetCursor, rewind, seek, setActive, setAlwaysInactive, setInactive, setThrottleMarkDelete, skipEntries, toString, trimDeletedEntries, updateLastActiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasyncReadEntries, asyncReadEntries, close, findNewestMatching, getNumberOfEntries, getReadPosition, hasMoreEntries, readEntriespublic ReadOnlyCursorImpl(BookKeeper bookkeeper, ManagedLedgerConfig config, ManagedLedgerImpl ledger, PositionImpl startPosition, String cursorName)
public void skipEntries(int numEntriesToSkip)
ReadOnlyCursorskipEntries in interface ReadOnlyCursornumEntriesToSkip - number of entries to skippublic void asyncClose(AsyncCallbacks.CloseCallback callback, Object ctx)
ManagedCursorasyncClose in interface ManagedCursorasyncClose in interface ReadOnlyCursorasyncClose in class ManagedCursorImplcallback - callback objectctx - opaque contextpublic MLDataFormats.ManagedLedgerInfo.LedgerInfo getCurrentLedgerInfo()
public long getNumberOfEntries(com.google.common.collect.Range<PositionImpl> range)
ReadOnlyCursorgetNumberOfEntries in interface ReadOnlyCursorgetNumberOfEntries in class ManagedCursorImplrange - the range between two positionsCopyright © 2017–2021 Apache Software Foundation. All rights reserved.