@Test void advancedTo() { MultiSourceTrackingToken result = testSubject.advancedTo("token1", new GlobalSequenceTrackingToken(4)); assertEquals(new GlobalSequenceTrackingToken(4), result.getTokenForStream("token1")); assertEquals(new GlobalSequenceTrackingToken(0), result.getTokenForStream("token2")); }
public MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream) { HashMap<String, TrackingToken> newTrackingTokens = new HashMap<>(trackingTokens); newTrackingTokens.put(streamName, newTokenForStream); return new MultiSourceTrackingToken(newTrackingTokens); }
MultiSourceTrackingToken implements TrackingToken, Serializable { public MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream) { HashMap<String, TrackingToken> newTrackingTokens = new HashMap<>(trackingTokens); newTrackingTokens.put(streamName, newTokenForStream); return new MultiSourceTrackingToken(newTrackingTokens); } }
MultiSourceTrackingToken implements TrackingToken, Serializable { public MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream) { HashMap<String, TrackingToken> newTrackingTokens = new HashMap<>(trackingTokens); newTrackingTokens.put(streamName, newTokenForStream); return new MultiSourceTrackingToken(newTrackingTokens); } @JsonCreator @ConstructorProperties({"trackingTokens"})  MultiSourceTrackingToken(@JsonProperty("trackingTokens") Map<String, TrackingToken> trackingTokens); }
MultiSourceTrackingToken implements TrackingToken, Serializable { public MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream) { HashMap<String, TrackingToken> newTrackingTokens = new HashMap<>(trackingTokens); newTrackingTokens.put(streamName, newTokenForStream); return new MultiSourceTrackingToken(newTrackingTokens); } @JsonCreator @ConstructorProperties({"trackingTokens"})  MultiSourceTrackingToken(@JsonProperty("trackingTokens") Map<String, TrackingToken> trackingTokens); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream); TrackingToken getTokenForStream(String streamName); Map<String, TrackingToken> getTrackingTokens(); @Override OptionalLong position(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
MultiSourceTrackingToken implements TrackingToken, Serializable { public MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream) { HashMap<String, TrackingToken> newTrackingTokens = new HashMap<>(trackingTokens); newTrackingTokens.put(streamName, newTokenForStream); return new MultiSourceTrackingToken(newTrackingTokens); } @JsonCreator @ConstructorProperties({"trackingTokens"})  MultiSourceTrackingToken(@JsonProperty("trackingTokens") Map<String, TrackingToken> trackingTokens); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other); MultiSourceTrackingToken advancedTo(String streamName, TrackingToken newTokenForStream); TrackingToken getTokenForStream(String streamName); Map<String, TrackingToken> getTrackingTokens(); @Override OptionalLong position(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }