public MemberStateImpl() {
}
@Override
public JsonObject toJson() {
JsonObject root = new JsonObject();
root.add("address", address);
JsonObject mapStatsObject = new JsonObject();
for (Map.Entry<String, LocalMapStatsImpl> entry : mapStats.entrySet()) {
mapStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("mapStats", mapStatsObject);
JsonObject multimapStatsObject = new JsonObject();
for (Map.Entry<String, LocalMultiMapStatsImpl> entry : multiMapStats.entrySet()) {
multimapStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("multiMapStats", multimapStatsObject);
JsonObject queueStatsObject = new JsonObject();
for (Map.Entry<String, LocalQueueStatsImpl> entry : queueStats.entrySet()) {
queueStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("queueStats", queueStatsObject);
JsonObject topicStatsObject = new JsonObject();
for (Map.Entry<String, LocalTopicStatsImpl> entry : topicStats.entrySet()) {
topicStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("topicStats", topicStatsObject);
JsonObject executorStatsObject = new JsonObject();
for (Map.Entry<String, LocalExecutorStatsImpl> entry : executorStats.entrySet()) {
executorStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("executorStats", executorStatsObject);
JsonObject cacheStatsObject = new JsonObject();
for (Map.Entry<String, LocalCacheStats> entry : cacheStats.entrySet()) {
cacheStatsObject.add(entry.getKey(), entry.getValue().toJson());
}
root.add("cacheStats", cacheStatsObject);
JsonObject runtimePropsObject = new JsonObject();
for (Map.Entry<String, Long> entry : runtimeProps.entrySet()) {
runtimePropsObject.add(entry.getKey(), entry.getValue());
}
root.add("runtimeProps", runtimePropsObject);
JsonArray partitionsArray = new JsonArray();
for (Integer lsPartition : partitions) {
partitionsArray.add(lsPartition);