@Test public void serialize() { KeyValueResultSerializer serializer = KeyValueResultSerializer.createDefault(ImmutableList.<String>of()); String s = serializer.serialize(dummyServer(), dummyQuery(), numericResult()); assertThat(s).isEqualTo("MemoryAlias.ObjectPendingFinalizationCount=10"); }
@Override public String serialize(Server server, Query query, Result result) { return String.format(format, KeyUtils.getKeyString(query, result, typeNames), result.getValue()); }
KeyValueResultSerializer implements ResultSerializer { @Override public String serialize(Server server, Query query, Result result) { return String.format(format, KeyUtils.getKeyString(query, result, typeNames), result.getValue()); } }
KeyValueResultSerializer implements ResultSerializer { @Override public String serialize(Server server, Query query, Result result) { return String.format(format, KeyUtils.getKeyString(query, result, typeNames), result.getValue()); } KeyValueResultSerializer(@JsonProperty("format") String format, @JsonProperty List<String> typeNames); }
KeyValueResultSerializer implements ResultSerializer { @Override public String serialize(Server server, Query query, Result result) { return String.format(format, KeyUtils.getKeyString(query, result, typeNames), result.getValue()); } KeyValueResultSerializer(@JsonProperty("format") String format, @JsonProperty List<String> typeNames); static KeyValueResultSerializer createDefault(List<String> typeNames); @Override String serialize(Server server, Query query, Result result); }
KeyValueResultSerializer implements ResultSerializer { @Override public String serialize(Server server, Query query, Result result) { return String.format(format, KeyUtils.getKeyString(query, result, typeNames), result.getValue()); } KeyValueResultSerializer(@JsonProperty("format") String format, @JsonProperty List<String> typeNames); static KeyValueResultSerializer createDefault(List<String> typeNames); @Override String serialize(Server server, Query query, Result result);  }