public void setNearCacheStats(NearCacheStatsImpl nearCacheStats) {
this.nearCacheStats = nearCacheStats;
}
public JsonObject toJson() {
JsonObject root = new JsonObject();
root.add("getCount", getCount);
root.add("putCount", putCount);
root.add("removeCount", removeCount);
root.add("numberOfOtherOperations", numberOfOtherOperations);
root.add("numberOfEvents", numberOfEvents);
root.add("lastAccessTime", lastAccessTime);
root.add("lastUpdateTime", lastUpdateTime);
root.add("hits", hits);
root.add("ownedEntryCount", ownedEntryCount);
root.add("backupEntryCount", backupEntryCount);
root.add("backupCount", backupCount);
root.add("ownedEntryMemoryCost", ownedEntryMemoryCost);
root.add("backupEntryMemoryCost", backupEntryMemoryCost);
root.add("creationTime", creationTime);
root.add("lockedEntryCount", lockedEntryCount);
root.add("dirtyEntryCount", dirtyEntryCount);
root.add("totalGetLatencies", totalGetLatencies);
root.add("totalPutLatencies", totalPutLatencies);
root.add("totalRemoveLatencies", totalRemoveLatencies);
root.add("maxGetLatency", maxGetLatency);
root.add("maxPutLatency", maxPutLatency);
root.add("maxRemoveLatency", maxRemoveLatency);
root.add("heapCost", heapCost);
if (nearCacheStats != null) {
root.add("nearCacheStats", nearCacheStats.toJson());
}
return root;
}