public static FunctionStatus decode(String json) throws IOException { return ObjectMapperFactory.getThreadLocal().readValue(json, FunctionStatus.class); } }
public static SinkStatus decode(String json) throws IOException { return ObjectMapperFactory.getThreadLocal().readValue(json, SinkStatus.class); } }
public static SourceStatus decode(String json) throws IOException { return ObjectMapperFactory.getThreadLocal().readValue(json, SourceStatus.class); } }
public static FunctionStats decode (String json) throws IOException { return ObjectMapperFactory.getThreadLocal().readValue(json, FunctionStats.class); } }
/** * Get the JSON of this object as a byte[]. * * @return A byte[] of this object's JSON. * @throws JsonProcessingException */ @JsonIgnore public byte[] getJsonBytes() throws JsonProcessingException { return ObjectMapperFactory.getThreadLocal().writeValueAsBytes(this); }
/** * Get the JSON of this object as a String. * * @return A String of this object's JSON. * @throws JsonProcessingException */ @JsonIgnore public String getJsonString() throws JsonProcessingException { return ObjectMapperFactory.getThreadLocal().writeValueAsString(this); } }
@Override public LoadManagerReport deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { ObjectMapper mapper = ObjectMapperFactory.getThreadLocal(); ObjectNode root = ObjectMapperFactory.getThreadLocal().readTree(jsonParser); if ((root.has("loadReportType") && root.get("loadReportType").asText().equals(LoadReport.loadReportType)) || (root.has("underLoaded"))) { return mapper.readValue(root.toString(), LoadReport.class); } else { return mapper.readValue(root.toString(), LocalBrokerData.class); } } }
T data = ObjectMapperFactory.getThreadLocal().readValue(response.getResponseBodyAsBytes(), clazz); future.complete(data); } catch (Exception e) {
@Override public Policies deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, Policies.class); } }
@Override public NamespaceEphemeralData deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, NamespaceEphemeralData.class); } };
@Override public Policies deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, Policies.class); } };
@Override public ClusterData deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, ClusterData.class); } };
@Override public LoadManagerReport deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, LoadManagerReport.class); } };
@Override public LoadReport deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, LoadReport.class); } };
@Override public Map<String, String> deserialize(String key, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, HashMap.class); } };
@Override public TenantInfo deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, TenantInfo.class); } };
@Override public FailureDomain deserialize(String path, byte[] content) throws Exception { return ObjectMapperFactory.getThreadLocal().readValue(content, FailureDomain.class); } };
/** * Get the JSON of this object as a String. * * @return A String of this object's JSON. * @throws JsonProcessingException */ @JsonIgnore public String getJsonString() throws JsonProcessingException { return ObjectMapperFactory.getThreadLocal().writeValueAsString(this); } }
/** * Get the JSON of this object as a byte[]. * * @return A byte[] of this object's JSON. * @throws JsonProcessingException */ @JsonIgnore public byte[] getJsonBytes() throws JsonProcessingException { return ObjectMapperFactory.getThreadLocal().writeValueAsBytes(this); }
@Override @SuppressWarnings("unchecked") public NamespaceIsolationPolicies deserialize(String path, byte[] content) throws Exception { return new NamespaceIsolationPolicies((Map<String, NamespaceIsolationData>) ObjectMapperFactory .getThreadLocal().readValue(content, new TypeReference<Map<String, NamespaceIsolationData>>() { })); } };