@Override public String getRegionName() { return region.getName(); }
@Override public void evictRegion(String regionName) { getRegion( regionName ).clear(); }
@Override public void close() { for ( Region region : regionsByName.values() ) { region.destroy(); } }
public Map getEntries() { Map map = new HashMap(); Iterator iter = region.toMap().entrySet().iterator(); while (iter.hasNext()) { Map.Entry me = (Map.Entry) iter.next(); map.put(((CacheKey) me.getKey()).getKey(), me.getValue()); } return map; }
@Override public long getElementCountInMemory() { return this.region.getElementCountInMemory(); }
@Override public long getElementCountOnDisk() { return this.region.getElementCountOnDisk(); }
@Override public long getSizeInMemory() { return this.region.getSizeInMemory(); }
public Map getEntries() { Map map = new HashMap(); Iterator iter = region.toMap().entrySet().iterator(); while (iter.hasNext()) { Map.Entry me = (Map.Entry) iter.next(); map.put(((CacheKey) me.getKey()).getKey(), me.getValue()); } return map; }
@Override public long getElementCountInMemory() { return this.region.getElementCountInMemory(); }
@Override public long getElementCountOnDisk() { return this.region.getElementCountOnDisk(); }
@Override public long getSizeInMemory() { return this.region.getSizeInMemory(); }
@Override public String toString() { StringBuilder buf = new StringBuilder().append( "CacheRegionStatistics" ) .append( "[region=").append( region.getName() ) .append( ",hitCount=").append( this.hitCount ) .append( ",missCount=").append( this.missCount ) .append( ",putCount=").append( this.putCount ) .append( ",elementCountInMemory=" ).append( this.getElementCountInMemory() ) .append( ",elementCountOnDisk=" ).append( this.getElementCountOnDisk() ) .append( ",sizeInMemory=" ).append( this.getSizeInMemory() ) .append( ']' ); return buf.toString(); } }
@Override public Map getEntries() { final Map map = new HashMap(); final Iterator iter = this.region.toMap().entrySet().iterator(); while ( iter.hasNext() ) { final Map.Entry me = (Map.Entry) iter.next(); map.put( ( (CacheKey) me.getKey() ).getKey(), me.getValue() ); } return map; }
public long getElementCountInMemory() { return region.getElementCountInMemory(); }
public long getElementCountOnDisk() { return region.getElementCountOnDisk(); }
public long getSizeInMemory() { return region.getSizeInMemory(); }
@Override public void close() { for ( Region region : regionsByName.values() ) { region.destroy(); } }
@Override public void evictRegion(String regionName) { getRegion( regionName ).clear(); }
public AbstractCacheableDataStatistics(Supplier<Region> regionSupplier) { final Region region = regionSupplier.get(); if ( region == null ) { this.cacheRegionName = null; this.cacheHitCount = null; this.cacheMissCount = null; this.cachePutCount = null; } else { this.cacheRegionName = region.getName(); this.cacheHitCount = new LongAdder(); this.cacheMissCount = new LongAdder(); this.cachePutCount = new LongAdder(); } }
@Override public Map getEntries() { final Map map = new HashMap(); final Iterator iter = this.region.toMap().entrySet().iterator(); while ( iter.hasNext() ) { final Map.Entry me = (Map.Entry) iter.next(); map.put( ( (CacheKey) me.getKey() ).getKey(), me.getValue() ); } return map; }