public class GlobalSequenceTrackingToken extends Object implements TrackingToken, Comparable<GlobalSequenceTrackingToken>, Serializable
| Constructor and Description |
|---|
GlobalSequenceTrackingToken(long globalIndex)
Initializes a
GlobalSequenceTrackingToken from the given globalIndex of the event. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GlobalSequenceTrackingToken o) |
boolean |
equals(Object o) |
long |
getGlobalIndex()
Get the global sequence number of the event
|
int |
hashCode() |
GlobalSequenceTrackingToken |
next()
Returns a new
GlobalSequenceTrackingToken instance with sequence number incremented by 1. |
GlobalSequenceTrackingToken |
offsetBy(int offset)
Returns a new
GlobalSequenceTrackingToken instance that is the sum of this token's sequence number and
the given offset. |
String |
toString() |
public GlobalSequenceTrackingToken(long globalIndex)
GlobalSequenceTrackingToken from the given globalIndex of the event.globalIndex - the global sequence number of the eventpublic long getGlobalIndex()
public GlobalSequenceTrackingToken offsetBy(int offset)
GlobalSequenceTrackingToken instance that is the sum of this token's sequence number and
the given offset.offset - the offset between this token's sequence number of that of the returned instancepublic GlobalSequenceTrackingToken next()
GlobalSequenceTrackingToken instance with sequence number incremented by 1.public int compareTo(GlobalSequenceTrackingToken o)
compareTo in interface Comparable<GlobalSequenceTrackingToken>Copyright © 2010–2017. All rights reserved.