@Override public Long getValue() { return cache.getStatistics().getLocalHeapSize(); } });
final long inMemoryCount = overflowToOffHeap ? cache.getStatistics().getLocalOffHeapSize() : cache.getStatistics().getLocalHeapSize(); if (inMemoryCount == 0L) { return false;
/** * Gets the number of objects in the MemoryStore * @return the MemoryStore size which is always a count unadjusted for duplicates or expiries */ public long getMemoryStoreObjectCount() { return statistics.getLocalHeapSize(); }
final long inMemoryCount = overflowToOffHeap ? cache.getStatistics().getLocalOffHeapSize() : cache.getStatistics().getLocalHeapSize(); if (inMemoryCount == 0L) { return false;
/** * {@inheritDoc} * * @see net.sf.ehcache.hibernate.management.api.EhcacheStats#getNumberOfElementsInMemory(java.lang.String) */ public int getNumberOfElementsInMemory(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null) { return (int) cache.getStatistics().getLocalHeapSize(); } else { return -1; } }
final long inMemoryCount = overflowToOffHeap ? cache.getStatistics().getLocalOffHeapSize() : cache.getStatistics().getLocalHeapSize(); if (inMemoryCount == 0L) { return false;
/** * Returns the number of elements in the memory store. * * @return the number of elements in the memory store * @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE} */ @Deprecated public final long getMemoryStoreSize() throws IllegalStateException { checkStatus(); return getStatistics().getLocalHeapSize(); }
/** * {@inheritDoc} */ @Override public long getLocalHeapSize() { try { return cache.getStatistics().getLocalHeapSize(); } catch (RuntimeException e) { throw Utils.newPlainException(e); } }
/** * Gets the number of objects in the MemoryStore * @return the MemoryStore size which is always a count unadjusted for duplicates or expiries */ public long getMemoryStoreObjectCount() { return statistics.getLocalHeapSize(); }
/** * Gets the number of objects in the MemoryStore * @return the MemoryStore size which is always a count unadjusted for duplicates or expiries */ public long getMemoryStoreObjectCount() { return statistics.getLocalHeapSize(); }
/** * {@inheritDoc} * * @see net.sf.ehcache.hibernate.management.api.EhcacheStats#getNumberOfElementsInMemory(java.lang.String) */ public int getNumberOfElementsInMemory(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null) { return (int) cache.getStatistics().getLocalHeapSize(); } else { return -1; } }
@Override public Long getValue() { return cache.getStatistics().getLocalHeapSize(); } });
/** * {@inheritDoc} * * @see net.sf.ehcache.hibernate.management.api.EhcacheStats#getNumberOfElementsInMemory(java.lang.String) */ public int getNumberOfElementsInMemory(String region) { Cache cache = this.cacheManager.getCache(region); if (cache != null) { return (int) cache.getStatistics().getLocalHeapSize(); } else { return -1; } }
/** * Returns the number of elements in the memory store. * * @return the number of elements in the memory store * @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE} */ @Deprecated public final long getMemoryStoreSize() throws IllegalStateException { checkStatus(); return getStatistics().getLocalHeapSize(); }
/** * Returns the number of elements in the memory store. * * @return the number of elements in the memory store * @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE} */ @Deprecated public final long getMemoryStoreSize() throws IllegalStateException { checkStatus(); return getStatistics().getLocalHeapSize(); }
/** * {@inheritDoc} */ @Override public long getLocalHeapSize() { try { return cache.getStatistics().getLocalHeapSize(); } catch (RuntimeException e) { throw Utils.newPlainException(e); } }
/** * {@inheritDoc} */ @Override public long getLocalHeapSize() { try { return cache.getStatistics().getLocalHeapSize(); } catch (RuntimeException e) { throw Utils.newPlainException(e); } }
cacheStats.put("HitCount", statisticsGateway.cacheHitCount()); cacheStats.put("MissCount", statisticsGateway.cacheMissCount()); cacheStats.put("LocalHeapSize", statisticsGateway.getLocalHeapSize()); cacheStats.put("LocalHeapHitCount", statisticsGateway.localHeapHitCount()); cacheStats.put("LocalHeapMissCount", statisticsGateway.localHeapMissCount());
(Gauge<Long>) () -> cache.getStatistics().getLocalHeapSize());