public interface EventTrackerStatus
Modifier and Type | Method and Description |
---|---|
OptionalLong |
getCurrentPosition()
Return the estimated relative current token position this Segment represents.
|
Throwable |
getError()
Returns the exception that caused processing to fail, if present.
|
OptionalLong |
getResetPosition()
Return the relative position at which a reset was triggered for this Segment.
|
Segment |
getSegment()
The segment for which this status is valid.
|
TrackingToken |
getTrackingToken()
The tracking token of the last event that has been seen by this Segment.
|
boolean |
isCaughtUp()
Whether the Segment of this status has caught up with the head of the event stream.
|
boolean |
isErrorState()
Indicates whether this status represents an error.
|
boolean |
isMerging()
Indicates whether this Segment is still merging two (or more) Segments.
|
boolean |
isReplaying()
Indicates whether this Segment is still replaying previously processed Events.
|
OptionalLong |
mergeCompletedPosition()
Return the estimated relative token position this Segment will have after a merge operation is complete.
|
Segment getSegment()
boolean isCaughtUp()
boolean isReplaying()
Note that this method will only recognize a replay if the tokens have been reset using
TrackingEventProcessor.resetTokens()
. Removing tokens directly from the underlying TokenStore
will not be
recognized as a replay.
true
if this segment is replaying historic events after a reset
, otherwise false
boolean isMerging()
true
if this segment is merging Segments, otherwise false
OptionalLong mergeCompletedPosition()
isMerging()
} returns true.
In case no estimation can be given or no merge in progress, an OptionalLong.empty()
will be returned.TrackingToken getTrackingToken()
The returned tracking token represents the position of this segment in the event stream. In case of a recent merge of segments, the token represents the lowest position of the two merged segments.
boolean isErrorState()
true
, the getError()
will return the exception that caused the failure.true
if an error was reported, otherwise false
Throwable getError()
null
.null
when processing normallyOptionalLong getCurrentPosition()
OptionalLong.empty()
will be returned.OptionalLong getResetPosition()
OptionalLong.empty()
will be returned.Copyright © 2010–2020. All rights reserved.