public interface TrackingToken
| Modifier and Type | Method and Description |
|---|---|
boolean |
covers(TrackingToken other)
Indicates whether this token covers the
other token completely. |
TrackingToken |
lowerBound(TrackingToken other)
Returns a token that represents the lower bound between this and the
other token. |
default OptionalLong |
position()
Return the estimated relative position this token represents.
|
TrackingToken |
upperBound(TrackingToken other)
Returns the token that represents the furthest possible position in a stream that either this token or the given
other represents. |
TrackingToken lowerBound(TrackingToken other)
other token. Effectively, the
returned token will cause messages not received by both this and the other token to be redelivered.other - The token to compare to this oneTrackingToken upperBound(TrackingToken other)
other represents. Effectively, this means this token will only deliver messages that neither this, nor
the other have been received.other - The token to compare this token toboolean covers(TrackingToken other)
other token completely. That means that this token represents a
position in a stream that has received all of the messages that a stream represented by the other token
has received.
Note that this operation is only safe when comparing tokens obtained from messages from the same
StreamableMessageSource.
other - The token to compare to this onetrue if this token covers the other, otherwise falsedefault OptionalLong position()
OptionalLong.empty() will be returned.Copyright © 2010–2020. All rights reserved.