@Override public Properties getProperties(boolean includeExpensiveDetails) { Properties p = new Properties(); p.put("name", cache.getName()); p.put("class", this.getClass().getSimpleName()); p.put("cacheClass", cache.getClass().getName()); p.put("guid", cache.getGuid()); p.put("disabled", cache.isDisabled()); p.put("statsEnabled", cache.isStatisticsEnabled()); p.put("status", cache.getStatus().toString()); p.put("maxEntries", cache.getCacheConfiguration().getMaxEntriesLocalHeap()); p.put("timeToLiveSecs", cache.getCacheConfiguration().getTimeToLiveSeconds()); p.put("timeToIdleSecs", cache.getCacheConfiguration().getTimeToIdleSeconds()); p.put("distributed", isDistributed()); p.put("eternal", cache.getCacheConfiguration().isEternal()); if (includeExpensiveDetails) { p.put("size", cache.getSize()); p.put("avgGetTime", cache.getStatistics().getAverageGetTime()); p.put("hits", cache.getStatistics().getCacheHits()); p.put("misses", cache.getStatistics().getCacheMisses()); p.put("evictions", cache.getStatistics().getEvictionCount()); p.put("count", cache.getStatistics().getMemoryStoreObjectCount()); p.put("searchPerSec", cache.getStatistics().getSearchesPerSecond()); } return p; }
state.setAverageGetTime(statistics.getAverageGetTime()); state.setCacheHits(statistics.getCacheHits()); state.setCacheMisses(statistics.getCacheMisses());