@Override public Stats getStats() { return this.getAdvancedCache().getStats(); } }
@Override protected long hitCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getHits(); }
@Override protected long putCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getStores(); }
@Override protected Long size() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getTotalNumberOfEntries(); }
@Override protected Long missCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getMisses(); }
@Override protected long hitCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getHits(); }
@Override protected Long evictionCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getEvictions(); }
@Override protected Long size() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getTotalNumberOfEntries(); }
@Override protected Long missCount() { if (cache == null) return 0L; return cache.getAdvancedCache().getStats().getMisses(); }
@Override public Stats getStats() { return this.getAdvancedCache().getStats(); }
private void assertCurrentNumberOfEntriesInMemory(float expectedValue) throws Exception { assertAttributeValue("NumberOfEntriesInMemory", expectedValue); assert expectedValue == advanced.getStats().getCurrentNumberOfEntriesInMemory(); } }
private void assertCurrentNumberOfEntries(float expectedValue) throws Exception { assertAttributeValue("NumberOfEntries", expectedValue); assert expectedValue == advanced.getStats().getCurrentNumberOfEntries(); }
private void assertRemoveMisses(float expectedValue) throws Exception { assertAttributeValue("RemoveMisses", expectedValue); assert expectedValue == advanced.getStats().getRemoveMisses(); }
private void assertEvictions(float expectedValue) throws Exception { assertAttributeValue("Evictions", expectedValue); assert expectedValue == advanced.getStats().getEvictions(); }
@AfterMethod public void cleanCache() { cache.clear(); cache.getAdvancedCache().getStats().reset(); }
@InvokeOnHeader("STATS") @InvokeOnHeader(InfinispanConstants.STATS) void onStats(Message message) { final BasicCache<Object, Object> cache = manager.getCache(message, this.cacheName); final Object result = InfinispanUtil.asAdvanced(cache).getStats(); setResult(message, result); }
private void assertHits(float expectedValue) throws Exception { assertAttributeValue("Hits", expectedValue); assert expectedValue == advanced.getStats().getHits(); }
private void assertRemoveHits(float expectedValue) throws Exception { assertAttributeValue("RemoveHits", expectedValue); assert expectedValue == advanced.getStats().getRemoveHits(); }
void stats(HotRodHeader header, Subject subject) { AdvancedCache<byte[], byte[]> cache = server.cache(header, subject); writeResponse(header, header.encoder().statsResponse(header, server, channel.alloc(), cache.getStats(), server.getTransport(), server.getCacheRegistry(header.cacheName))); }
public void testStatistics() { Configuration cfg = new ConfigurationBuilder().simpleCache(true).jmxStatistics().enabled(true).build(); String name = "statsCache"; cacheManager.defineConfiguration(name, cfg); Cache<Object, Object> cache = cacheManager.getCache(name); assertEquals(0L, cache.getAdvancedCache().getStats().getStores()); cache.put("key", "value"); assertEquals(1L, cache.getAdvancedCache().getStats().getStores()); } }