@Override public CacheStatistics getLocalCacheStatistics() { return cache.getLocalCacheStatistics(); }
protected static void printNearCacheStats(ICache<Integer, Article> cache) { NearCacheStats stats = cache.getLocalCacheStatistics().getNearCacheStatistics(); System.out.printf("The Near Cache contains %d entries.%n", stats.getOwnedEntryCount()); System.out.printf("The first article instance was retrieved from the remote instance (Near Cache misses: %d).%n", stats.getMisses()); System.out.printf( "The second and third article instance were retrieved from the local Near Cache (Near Cache hits: %d).%n", stats.getHits()); }
protected static void printNearCacheStats(ICache<?, ?> cache, String message) { NearCacheStats stats = cache.getLocalCacheStatistics().getNearCacheStatistics(); System.out.printf("%s (%d entries, %d hits, %d misses, %d evictions, %d expirations)%n", message, stats.getOwnedEntryCount(), stats.getHits(), stats.getMisses(), stats.getEvictions(), stats.getExpirations()); }
System.out.println("Near Cache from cache 1: " + cache1.getLocalCacheStatistics().getNearCacheStatistics()); System.out.println("Near Cache from cache 2: " + cache2.getLocalCacheStatistics().getNearCacheStatistics()); HazelcastClient.shutdownAll(); Hazelcast.shutdownAll();