@Test public void shouldParseFromSimpleString() { assertThat(new GtidSourceOffset(gtidSet1), is(GtidSourceOffset.parse(gtidSet1))); }
public static GtidSourceOffset parse(String offset) { if (offset.trim().startsWith("{")) { try { return mapper.readValue(offset, GtidSourceOffset.class); } catch (IOException e) { throw Throwables.propagate(e); } } else { return new GtidSourceOffset(offset); } }
GtidSourceOffset implements SourceOffset { public static GtidSourceOffset parse(String offset) { if (offset.trim().startsWith("{")) { try { return mapper.readValue(offset, GtidSourceOffset.class); } catch (IOException e) { throw Throwables.propagate(e); } } else { return new GtidSourceOffset(offset); } } }
GtidSourceOffset implements SourceOffset { public static GtidSourceOffset parse(String offset) { if (offset.trim().startsWith("{")) { try { return mapper.readValue(offset, GtidSourceOffset.class); } catch (IOException e) { throw Throwables.propagate(e); } } else { return new GtidSourceOffset(offset); } } GtidSourceOffset(String gtidSet); @JsonCreator  GtidSourceOffset(
      @JsonProperty("gtidSet") String gtidSet,
      @JsonProperty("incompleteTransactions") Map<String, Long> incompleteTransactions
  ); }
GtidSourceOffset implements SourceOffset { public static GtidSourceOffset parse(String offset) { if (offset.trim().startsWith("{")) { try { return mapper.readValue(offset, GtidSourceOffset.class); } catch (IOException e) { throw Throwables.propagate(e); } } else { return new GtidSourceOffset(offset); } } GtidSourceOffset(String gtidSet); @JsonCreator  GtidSourceOffset(
      @JsonProperty("gtidSet") String gtidSet,
      @JsonProperty("incompleteTransactions") Map<String, Long> incompleteTransactions
  ); @Override String format(); @Override void positionClient(BinaryLogClient client); GtidSourceOffset withIncompleteTransaction(String gtid, long seqNo); GtidSourceOffset finishTransaction(String gtid); GtidSourceOffset withGtidSet(String gtidSet); @JsonIgnore String getGtid(); @JsonIgnore long getSeqNo(); boolean incompleteTransactionsContain(String gtid, long seqNo); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static GtidSourceOffset parse(String offset); }
GtidSourceOffset implements SourceOffset { public static GtidSourceOffset parse(String offset) { if (offset.trim().startsWith("{")) { try { return mapper.readValue(offset, GtidSourceOffset.class); } catch (IOException e) { throw Throwables.propagate(e); } } else { return new GtidSourceOffset(offset); } } GtidSourceOffset(String gtidSet); @JsonCreator  GtidSourceOffset(
      @JsonProperty("gtidSet") String gtidSet,
      @JsonProperty("incompleteTransactions") Map<String, Long> incompleteTransactions
  ); @Override String format(); @Override void positionClient(BinaryLogClient client); GtidSourceOffset withIncompleteTransaction(String gtid, long seqNo); GtidSourceOffset finishTransaction(String gtid); GtidSourceOffset withGtidSet(String gtidSet); @JsonIgnore String getGtid(); @JsonIgnore long getSeqNo(); boolean incompleteTransactionsContain(String gtid, long seqNo); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static GtidSourceOffset parse(String offset);  }