@Override public Object get(Value value, Class<?> clazz, CoderContext context) { try { return ServerIssue.parseFrom(value.getByteArray()); } catch (IOException e) { throw new IllegalStateException("Unable to read issue from cache", e); } }
@Override public void put(Value value, Object object, CoderContext context) { ServerIssue issue = (ServerIssue) object; value.putByteArray(issue.toByteArray()); }