@Override public LocalMapStats getLocalMapStats() { return map.getLocalMapStats(); }
@Override public LocalMapStats get() { return map.getLocalMapStats(); } }
@Override public LocalMapStats get() { return map.getLocalMapStats(); } }
@Override public LocalMapStats getLocalMapStats() { return map.getLocalMapStats(); }
@Override public LocalMapStats getLocalMapStats() { return map.getLocalMapStats(); }
@Override @Nullable String getCacheInfo() { IMap<Object, Object> map = hazelcast.getMap(CacheNames.THROTTLING); return "Throttling Hazelcast statistics dump:\n" + map.getLocalMapStats().toString(); }
@Override public String getDescription() { return "HCMap("+getName()+"):"+cache.getLocalMapStats(); // TODO we really want the cluster stats }
private void mapStats() { log(hazelcast.getMap("myMap").getLocalMapStats()); }
private static long totalEntryCountOnNode(String name, HazelcastInstance instance) { IMap map = instance.getMap(name); LocalMapStats localMapStats = map.getLocalMapStats(); long ownedEntryCount = localMapStats.getOwnedEntryCount(); long backupEntryCount = localMapStats.getBackupEntryCount(); return ownedEntryCount + backupEntryCount; }
@Override public Long call() throws Exception { IMap<Long, Document> xddCache = hzInstance.getMap(CN_XDM_DOCUMENT); IMap<DataKey, Element> xdmCache = hzInstance.getMap(CN_XDM_ELEMENT); LocalMapStats stats = xddCache.getLocalMapStats(); long size = stats.getBackupEntryMemoryCost() + stats.getOwnedEntryMemoryCost(); stats = xdmCache.getLocalMapStats(); size += stats.getBackupEntryMemoryCost() + stats.getOwnedEntryMemoryCost(); return size; }
@SuppressWarnings("SameParameterValue") protected static void waitForNearCacheEvictionCount(IMap<?, Article> map, int expectedEvictionCount) { long evictionCount; do { NearCacheStats stats = map.getLocalMapStats().getNearCacheStats(); evictionCount = stats.getEvictions(); } while (evictionCount > expectedEvictionCount); }
@Override public int getVersion() { if (detached) throw detachedException(); return (int) distributedMap.getLocalMapStats().getPutOperationCount(); }
protected static void printNearCacheStats(IMap<?, Article> map) { NearCacheStats stats = map.getLocalMapStats().getNearCacheStats(); 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()); }
IMap map = Hazelcast.getMap("test"); for (int i = 0; i < 100; i++) { map.put(i, i); map.get(i); } LocalMapStats stats = map.getLocalMapStats(); System.err.println(stats.getHits()); System.err.println(stats.getOwnedEntryCount());
public static void main(String[] args) { HazelcastInstance node = Hazelcast.newHazelcastInstance(newConfig()); IMap<String, String> map = node.getMap("default"); for (int i = 0; i < 1000; i++) { map.put("key-" + i, "value-" + i); } // first get() populates the Near cache with the remote entry for (int i = 0; i < 1000; i++) { map.get("key-" + i); } long ownedEntryCount = map.getLocalMapStats().getNearCacheStats().getOwnedEntryCount(); System.out.println("Near Cache includes " + ownedEntryCount + " entries"); node.shutdown(); }
private void handStats(String[] args) { String iteratorStr = args[0]; if (iteratorStr.startsWith("m.")) { println(getMap().getLocalMapStats()); } else if (iteratorStr.startsWith("mm.")) { println(getMultiMap().getLocalMultiMapStats()); } else if (iteratorStr.startsWith("q.")) { println(getQueue().getLocalQueueStats()); } }
private void handStats(String[] args) { String iteratorStr = args[0]; if (iteratorStr.startsWith("m.")) { println(getMap().getLocalMapStats()); } else if (iteratorStr.startsWith("mm.")) { println(getMultiMap().getLocalMultiMapStats()); } else if (iteratorStr.startsWith("q.")) { println(getQueue().getLocalQueueStats()); } }
private void handStats(String[] args) { String iteratorStr = args[0]; if (iteratorStr.startsWith("m.")) { println(getMap().getLocalMapStats()); } else if (iteratorStr.startsWith("mm.")) { println(getMultiMap().getLocalMultiMapStats()); } else if (iteratorStr.startsWith("q.")) { println(getQueue().getLocalQueueStats()); } }
private void handStats(String[] args) { String iteratorStr = args[0]; if (iteratorStr.startsWith("m.")) { println(getMap().getLocalMapStats()); } else if (iteratorStr.startsWith("mm.")) { println(getMultiMap().getLocalMultiMapStats()); } else if (iteratorStr.startsWith("q.")) { println(getQueue().getLocalQueueStats()); } }
protected static void printNearCacheStats(IMap<?, Article> map, String message) { NearCacheStats stats = map.getLocalMapStats().getNearCacheStats(); 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()); }