Class PositionImpl
java.lang.Object
org.apache.bookkeeper.mledger.impl.PositionImpl
- All Implemented Interfaces:
Comparable<PositionImpl>,Position
- Direct Known Subclasses:
PositionImplRecyclable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long[]static final PositionImplprotected longstatic final PositionImplprotected long -
Constructor Summary
ConstructorsConstructorDescriptionPositionImpl(long ledgerId, long entryId) PositionImpl(long ledgerId, long entryId, long[] ackSet) PositionImpl(PositionImpl other) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(long ledgerId, long entryId) intcompareTo(PositionImpl that) booleanstatic PositionImplget(long ledgerId, long entryId) static PositionImplget(long ledgerId, long entryId, long[] ackSet) static PositionImplget(PositionImpl other) long[]longlonggetNext()Get the position of the entry next to this one.getPositionAfterEntries(int entryNum) Position after moving entryNum messages, if entryNum < 1, then return the current position.booleaninthashCode()voidsetAckSet(long[] ackSet) toString()String representation of virtual cursor - LedgerId:EntryId.
-
Field Details
-
ledgerId
protected long ledgerId -
entryId
protected long entryId -
ackSet
protected long[] ackSet -
EARLIEST
-
LATEST
-
-
Constructor Details
-
PositionImpl
-
PositionImpl
-
PositionImpl
public PositionImpl(long ledgerId, long entryId) -
PositionImpl
public PositionImpl(long ledgerId, long entryId, long[] ackSet) -
PositionImpl
-
-
Method Details
-
get
-
get
-
get
-
getAckSet
public long[] getAckSet() -
setAckSet
public void setAckSet(long[] ackSet) -
getLedgerId
public long getLedgerId()- Specified by:
getLedgerIdin interfacePosition
-
getEntryId
public long getEntryId()- Specified by:
getEntryIdin interfacePosition
-
getNext
Description copied from interface:PositionGet the position of the entry next to this one. The returned position might point to a non-existing, or not-yet existing entry -
getPositionAfterEntries
Position after moving entryNum messages, if entryNum < 1, then return the current position. -
toString
String representation of virtual cursor - LedgerId:EntryId. -
compareTo
- Specified by:
compareToin interfaceComparable<PositionImpl>
-
compareTo
public int compareTo(long ledgerId, long entryId) -
hashCode
public int hashCode() -
equals
-
hasAckSet
public boolean hasAckSet() -
getPositionInfo
-