@Test void testLowerBound() { GlobalSequenceTrackingToken token1 = new GlobalSequenceTrackingToken(1L); GlobalSequenceTrackingToken token2 = new GlobalSequenceTrackingToken(2L); assertSame(token1, token1.lowerBound(token2)); assertSame(token1, token2.lowerBound(token1)); assertSame(token2, token2.lowerBound(token2)); }
@Override public TrackingToken lowerBound(TrackingToken other) { Assert.isTrue(other instanceof GlobalSequenceTrackingToken, () -> "Incompatible token type provided."); GlobalSequenceTrackingToken otherToken = (GlobalSequenceTrackingToken) other; if (otherToken.globalIndex < this.globalIndex) { return otherToken; } else { return this; } }
GlobalSequenceTrackingToken implements TrackingToken, Comparable<GlobalSequenceTrackingToken>,
                                                    Serializable { @Override public TrackingToken lowerBound(TrackingToken other) { Assert.isTrue(other instanceof GlobalSequenceTrackingToken, () -> "Incompatible token type provided."); GlobalSequenceTrackingToken otherToken = (GlobalSequenceTrackingToken) other; if (otherToken.globalIndex < this.globalIndex) { return otherToken; } else { return this; } } }
GlobalSequenceTrackingToken implements TrackingToken, Comparable<GlobalSequenceTrackingToken>,
                                                    Serializable { @Override public TrackingToken lowerBound(TrackingToken other) { Assert.isTrue(other instanceof GlobalSequenceTrackingToken, () -> "Incompatible token type provided."); GlobalSequenceTrackingToken otherToken = (GlobalSequenceTrackingToken) other; if (otherToken.globalIndex < this.globalIndex) { return otherToken; } else { return this; } } @JsonCreator @ConstructorProperties({"globalIndex"})  GlobalSequenceTrackingToken(@JsonProperty("globalIndex") long globalIndex); }
GlobalSequenceTrackingToken implements TrackingToken, Comparable<GlobalSequenceTrackingToken>,
                                                    Serializable { @Override public TrackingToken lowerBound(TrackingToken other) { Assert.isTrue(other instanceof GlobalSequenceTrackingToken, () -> "Incompatible token type provided."); GlobalSequenceTrackingToken otherToken = (GlobalSequenceTrackingToken) other; if (otherToken.globalIndex < this.globalIndex) { return otherToken; } else { return this; } } @JsonCreator @ConstructorProperties({"globalIndex"})  GlobalSequenceTrackingToken(@JsonProperty("globalIndex") long globalIndex); long getGlobalIndex(); GlobalSequenceTrackingToken offsetBy(int offset); GlobalSequenceTrackingToken next(); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(GlobalSequenceTrackingToken o); @Override OptionalLong position(); }
GlobalSequenceTrackingToken implements TrackingToken, Comparable<GlobalSequenceTrackingToken>,
                                                    Serializable { @Override public TrackingToken lowerBound(TrackingToken other) { Assert.isTrue(other instanceof GlobalSequenceTrackingToken, () -> "Incompatible token type provided."); GlobalSequenceTrackingToken otherToken = (GlobalSequenceTrackingToken) other; if (otherToken.globalIndex < this.globalIndex) { return otherToken; } else { return this; } } @JsonCreator @ConstructorProperties({"globalIndex"})  GlobalSequenceTrackingToken(@JsonProperty("globalIndex") long globalIndex); long getGlobalIndex(); GlobalSequenceTrackingToken offsetBy(int offset); GlobalSequenceTrackingToken next(); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(GlobalSequenceTrackingToken o); @Override OptionalLong position();  }