@Test void testPosition() { TrackingToken replayToken = ReplayToken.createReplayToken(innerToken, GapAwareTrackingToken.newInstance(11L, Collections.singleton(9L))); assertEquals(11L, replayToken.position().getAsLong()); }
@Override public OptionalLong position() { if(currentToken != null){ return currentToken.position(); } return OptionalLong.empty(); }
ReplayToken implements TrackingToken, WrappedToken, Serializable { @Override public OptionalLong position() { if(currentToken != null){ return currentToken.position(); } return OptionalLong.empty(); } }
ReplayToken implements TrackingToken, WrappedToken, Serializable { @Override public OptionalLong position() { if(currentToken != null){ return currentToken.position(); } return OptionalLong.empty(); } ReplayToken(TrackingToken tokenAtReset); @JsonCreator @ConstructorProperties({"tokenAtReset", "currentToken"})  ReplayToken(@JsonProperty("tokenAtReset") TrackingToken tokenAtReset,
                       @JsonProperty("currentToken") TrackingToken newRedeliveryToken); private  ReplayToken(TrackingToken tokenAtReset,
                       TrackingToken newRedeliveryToken,
                       boolean lastMessageWasReplay); }
ReplayToken implements TrackingToken, WrappedToken, Serializable { @Override public OptionalLong position() { if(currentToken != null){ return currentToken.position(); } return OptionalLong.empty(); } ReplayToken(TrackingToken tokenAtReset); @JsonCreator @ConstructorProperties({"tokenAtReset", "currentToken"})  ReplayToken(@JsonProperty("tokenAtReset") TrackingToken tokenAtReset,
                       @JsonProperty("currentToken") TrackingToken newRedeliveryToken); private  ReplayToken(TrackingToken tokenAtReset,
                       TrackingToken newRedeliveryToken,
                       boolean lastMessageWasReplay); static TrackingToken createReplayToken(TrackingToken tokenAtReset, TrackingToken startPosition); static TrackingToken createReplayToken(TrackingToken tokenAtReset); static boolean isReplay(Message<?> message); static boolean isReplay(TrackingToken trackingToken); static OptionalLong getTokenAtReset(TrackingToken trackingToken); TrackingToken getTokenAtReset(); TrackingToken getCurrentToken(); @Override TrackingToken advancedTo(TrackingToken newToken); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); @Override TrackingToken lowerBound(); @Override TrackingToken upperBound(); @Override Optional<R> unwrap(Class<R> tokenType); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override OptionalLong position(); }
ReplayToken implements TrackingToken, WrappedToken, Serializable { @Override public OptionalLong position() { if(currentToken != null){ return currentToken.position(); } return OptionalLong.empty(); } ReplayToken(TrackingToken tokenAtReset); @JsonCreator @ConstructorProperties({"tokenAtReset", "currentToken"})  ReplayToken(@JsonProperty("tokenAtReset") TrackingToken tokenAtReset,
                       @JsonProperty("currentToken") TrackingToken newRedeliveryToken); private  ReplayToken(TrackingToken tokenAtReset,
                       TrackingToken newRedeliveryToken,
                       boolean lastMessageWasReplay); static TrackingToken createReplayToken(TrackingToken tokenAtReset, TrackingToken startPosition); static TrackingToken createReplayToken(TrackingToken tokenAtReset); static boolean isReplay(Message<?> message); static boolean isReplay(TrackingToken trackingToken); static OptionalLong getTokenAtReset(TrackingToken trackingToken); TrackingToken getTokenAtReset(); TrackingToken getCurrentToken(); @Override TrackingToken advancedTo(TrackingToken newToken); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); @Override TrackingToken lowerBound(); @Override TrackingToken upperBound(); @Override Optional<R> unwrap(Class<R> tokenType); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override OptionalLong position();  }