接口的使用
org.apache.bookkeeper.mledger.Position
使用Position的程序包
程序包
说明
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
-
org.apache.bookkeeper.mledger中Position的使用
修饰符和类型方法说明ManagedLedger.addEntry(byte[] data) Append a new entry to the end of a managed ledger.ManagedLedger.addEntry(byte[] data, int numberOfMessages) Append a new entry to the end of a managed ledger.ManagedLedger.addEntry(byte[] data, int offset, int length) Append a new entry to the end of a managed ledger.ManagedLedger.addEntry(byte[] data, int numberOfMessages, int offset, int length) Append a new entry to the end of a managed ledger.ManagedCursor.findNewestMatching(com.google.common.base.Predicate<Entry> condition) Find the newest entry that matches the given predicate.ManagedCursor.findNewestMatching(ManagedCursor.FindPositionConstraint constraint, com.google.common.base.Predicate<Entry> condition) Find the newest entry that matches the given predicate.ReadOnlyCursor.findNewestMatching(ManagedCursor.FindPositionConstraint constraint, com.google.common.base.Predicate<Entry> condition) Find the newest entry that matches the given predicate.ManagedCursor.getFirstPosition()Get the first position.ManagedLedger.getLastConfirmedEntry()Gets last confirmed entry of the managed ledger.ManagedCursor.getMarkDeletedPosition()Get the newest mark deleted position on this cursor.Position.getNext()Get the position of the entry next to this one.ManagedCursor.getPersistentMarkDeletedPosition()Get the persistent newest mark deleted position on this cursor.Entry.getPosition()ManagedCursor.getReadPosition()Get the read position.ReadOnlyCursor.getReadPosition()Get the read position.LedgerOffloader.OffloadHandle.lastOffered()ManagedLedger.offloadPrefix(Position pos) Offload as many entries before position as possible to longterm storage.ManagedLedger.terminate()Terminate the managed ledger and return the last committed entry.返回变量类型为Position的类型的org.apache.bookkeeper.mledger中的方法修饰符和类型方法说明ManagedLedger.asyncFindPosition(com.google.common.base.Predicate<Entry> predicate) Find position by sequenceId.ManagedCursor.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) Read the specified set of positions from ManagedLedger without ordering.ManagedCursor.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx, boolean sortEntries) Read the specified set of positions from ManagedLedger.LedgerOffloader.OffloadHandle.lastOfferedAsync()参数类型为Position的org.apache.bookkeeper.mledger中的方法修饰符和类型方法说明voidAsyncCallbacks.AddEntryCallback.addComplete(Position position, io.netty.buffer.ByteBuf entryData, Object ctx) voidManagedCursor.asyncDelete(Position position, AsyncCallbacks.DeleteCallback callback, Object ctx) Delete a single message asynchronouslyvoidManagedCursor.asyncMarkDelete(Position position, Map<String, Long> properties, AsyncCallbacks.MarkDeleteCallback callback, Object ctx) Asynchronous mark delete.voidManagedCursor.asyncMarkDelete(Position position, AsyncCallbacks.MarkDeleteCallback callback, Object ctx) Asynchronous mark delete.voidManagedLedger.asyncOffloadPrefix(Position pos, AsyncCallbacks.OffloadCallback callback, Object ctx) Offload as many entries before position as possible to longterm storage.voidManagedLedgerFactory.asyncOpenReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config, AsyncCallbacks.OpenReadOnlyCursorCallback callback, Object ctx) Open aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.voidManagedCursor.asyncResetCursor(Position position, boolean forceReset, AsyncCallbacks.ResetCursorCallback callback) reset the cursor to specified position to enable replay of messages.voidDelete a single message.voidAsyncCallbacks.FindEntryCallback.findEntryComplete(Position position, Object ctx) voidManagedCursor.markDelete(Position position) This signals that the reader is done with all the entries up to "position" (included).voidManagedCursor.markDelete(Position position, Map<String, Long> properties) This signals that the reader is done with all the entries up to "position" (included).ManagedLedger.newNonDurableCursor(Position startCursorPosition) Creates a new cursor whose metadata is not backed by durable storage.ManagedLedger.newNonDurableCursor(Position startPosition, String subscriptionName) ManagedLedger.newNonDurableCursor(Position startPosition, String subscriptionName, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, boolean isReadCompacted) voidAsyncCallbacks.OffloadCallback.offloadComplete(Position pos, Object ctx) ManagedLedger.offloadPrefix(Position pos) Offload as many entries before position as possible to longterm storage.ManagedLedgerFactory.openReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config) Open aReadOnlyCursorpositioned to the earliest entry for the specified managed ledger.voidManagedCursor.resetCursor(Position position) reset the cursor to specified position to enable replay of messages.default voidMove the cursor to a different read position.voidvoidAsyncCallbacks.TerminateCallback.terminateComplete(Position lastCommittedPosition, Object ctx) 类型变量类型为Position的org.apache.bookkeeper.mledger中的方法参数修饰符和类型方法说明voidManagedCursor.asyncDelete(Iterable<Position> position, AsyncCallbacks.DeleteCallback callback, Object ctx) Delete a group of messages asynchronouslyManagedCursor.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) Read the specified set of positions from ManagedLedger without ordering.ManagedCursor.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx, boolean sortEntries) Read the specified set of positions from ManagedLedger.voidDelete a group of entries.voidAsyncCallbacks.FindEntryCallback.findEntryFailed(ManagedLedgerException exception, Optional<Position> failedReadPosition, Object ctx) ManagedCursor.replayEntries(Set<? extends Position> positions) Read the specified set of positions from ManagedLedger. -
org.apache.bookkeeper.mledger.impl中Position的使用
修饰符和类型方法说明ManagedLedgerImpl.addEntry(byte[] data) ManagedLedgerImpl.addEntry(byte[] data, int numberOfMessages) ManagedLedgerImpl.addEntry(byte[] data, int offset, int length) ManagedLedgerImpl.addEntry(byte[] data, int numberOfMessages, int offset, int length) ManagedCursorImpl.findNewestMatching(com.google.common.base.Predicate<Entry> condition) ManagedCursorImpl.findNewestMatching(ManagedCursor.FindPositionConstraint constraint, com.google.common.base.Predicate<Entry> condition) ManagedCursorImpl.getFirstPosition()ManagedLedgerImpl.getLastConfirmedEntry()ManagedCursorImpl.getMarkDeletedPosition()ManagedCursorImpl.getNextLedgerPosition(long currentLedgerId) ManagedCursorImpl.getPersistentMarkDeletedPosition()ManagedCursorImpl.getReadPosition()ManagedLedgerImpl.getTheSlowestNonDurationReadPosition()ManagedLedgerImpl.offloadPrefix(Position pos) ManagedLedgerImpl.terminate()返回变量类型为Position的类型的org.apache.bookkeeper.mledger.impl中的方法修饰符和类型方法说明ManagedLedgerImpl.asyncFindPosition(com.google.common.base.Predicate<Entry> predicate) ManagedCursorImpl.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) Async replays given positions: a. before reading it filters out already-acked messages b. reads remaining entries async and gives it to given ReadEntriesCallback c. returns all already-acked messages which are not replayed so, those messages can be removed by caller(Dispatcher)'s replay-list and it won't try to replay it againManagedCursorImpl.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx, boolean sortEntries) 修饰符和类型方法说明voidManagedCursorContainer.add(ManagedCursor cursor, Position position) Add a cursor to the container.voidManagedCursorImpl.asyncDelete(Position pos, AsyncCallbacks.DeleteCallback callback, Object ctx) voidManagedCursorImpl.asyncMarkDelete(Position position, Map<String, Long> properties, AsyncCallbacks.MarkDeleteCallback callback, Object ctx) voidManagedCursorImpl.asyncMarkDelete(Position position, AsyncCallbacks.MarkDeleteCallback callback, Object ctx) voidManagedLedgerImpl.asyncOffloadPrefix(Position pos, AsyncCallbacks.OffloadCallback callback, Object ctx) voidManagedLedgerFactoryImpl.asyncOpenReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config, AsyncCallbacks.OpenReadOnlyCursorCallback callback, Object ctx) voidManagedCursorImpl.asyncResetCursor(Position newPos, boolean forceReset, AsyncCallbacks.ResetCursorCallback callback) org.apache.commons.lang3.tuple.Pair<PositionImpl,PositionImpl> ManagedCursorContainer.cursorUpdated(ManagedCursor cursor, Position newPosition) Signal that a cursor position has been updated and that the container must re-order the cursor heap tracking the slowest reader.voidlong[]ManagedCursorImpl.getBatchPositionAckSet(Position position) booleanManagedCursorImpl.isMessageDeleted(Position position) voidManagedCursorImpl.markDelete(Position position) voidManagedCursorImpl.markDelete(Position position, Map<String, Long> properties) ManagedLedgerImpl.newNonDurableCursor(Position startCursorPosition) ManagedLedgerImpl.newNonDurableCursor(Position startPosition, String subscriptionName) ManagedLedgerImpl.newNonDurableCursor(Position startCursorPosition, String cursorName, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, boolean isReadCompacted) ManagedLedgerImpl.offloadPrefix(Position pos) voidManagedLedgerImpl.onCursorReadPositionUpdated(ManagedCursorImpl cursor, Position newReadPosition) ManagedLedgerFactoryImpl.openReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config) voidManagedCursorImpl.resetCursor(Position newPos) void类型变量类型为Position的org.apache.bookkeeper.mledger.impl中的方法参数修饰符和类型方法说明voidManagedCursorImpl.asyncDelete(Iterable<Position> positions, AsyncCallbacks.DeleteCallback callback, Object ctx) ManagedCursorImpl.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) Async replays given positions: a. before reading it filters out already-acked messages b. reads remaining entries async and gives it to given ReadEntriesCallback c. returns all already-acked messages which are not replayed so, those messages can be removed by caller(Dispatcher)'s replay-list and it won't try to replay it againManagedCursorImpl.asyncReplayEntries(Set<? extends Position> positions, AsyncCallbacks.ReadEntriesCallback callback, Object ctx, boolean sortEntries) voidManagedCursorImpl.replayEntries(Set<? extends Position> positions)