@Override public void setDropHandler(BiConsumer<Key, T> dropHandler) { cache.setDropHandler(dropHandler) ; }
@Override synchronized public void setDropHandler(ActionKeyValue<Key, T> dropHandler) { cache.setDropHandler(dropHandler) ; }
@Override public void setDropHandler(BiConsumer<Key, T> dropHandler) { cache.setDropHandler(dropHandler) ; }
@Override public void setDropHandler(ActionKeyValue<Key, T> dropHandler) { cache.setDropHandler(dropHandler) ; }
public CacheStatsSimple(Cache<Key,Value> cache) { super(cache) ; cache.setDropHandler(new EjectMonitor(null)) ; }
/** Callback for entries when dropped from the cache */ @Override public void setDropHandler(Consumer<T> dropHandler) { cacheMap.setDropHandler(new Wrapper<>(dropHandler)) ; }
/** Callback for entries when dropped from the cache */ @Override public void setDropHandler(Consumer<T> dropHandler) { cacheMap.setDropHandler(new Wrapper<>(dropHandler)) ; }
public CacheStatsAtomic(Cache<Key,Value> cache) { super(cache) ; cache.setDropHandler(new EjectMonitor(null)) ; }
@Override public void setDropHandler(ActionKeyValue<Key,Value> dropHandler) { cache.setDropHandler(new EjectMonitor(dropHandler)) ; }
@Override public void setDropHandler(ActionKeyValue<Key,Value> dropHandler) { cache.setDropHandler(new EjectMonitor(dropHandler)) ; }
private BlockMgrCache(int readSlots, int writeSlots, final BlockMgr blockMgr) { super(blockMgr) ; // Caches are related so we can't use a Getter for cache management. if ( readSlots < -1 ) readCache = CacheFactory.createNullCache() ; else readCache = CacheFactory.createCache(readSlots) ; if ( writeSlots <= 0 ) writeCache = null ; else { writeCache = CacheFactory.createCache(writeSlots) ; writeCache.setDropHandler((id, block) -> { // We're inside a synchronized operation at this point. log("Cache spill: write block: %d", id) ; if ( block == null ) { log.warn("Write cache: " + id + " dropping an entry that isn't there") ; return ; } // Force the block to be writtern // by sending it to the wrapped BlockMgr BlockMgrCache.super.write(block) ; }) ; } }
private BlockMgrCache(int readSlots, int writeSlots, final BlockMgr blockMgr) { super(blockMgr) ; // Caches are related so we can't use a Getter for cache management. if ( readSlots < -1 ) readCache = CacheFactory.createNullCache() ; else readCache = CacheFactory.createCache(readSlots) ; if ( writeSlots <= 0 ) writeCache = null ; else { writeCache = CacheFactory.createCache(writeSlots) ; writeCache.setDropHandler((id, block) -> { // We're inside a synchronized operation at this point. log("Cache spill: write block: %d", id) ; if ( block == null ) { log.warn("Write cache: " + id + " dropping an entry that isn't there") ; return ; } // Force the block to be writtern // by sending it to the wrapped BlockMgr BlockMgrCache.super.write(block) ; }) ; } }
private BlockMgrCache(int readSlots, int writeSlots, final BlockMgr blockMgr) { super(blockMgr) ; // Caches are related so we can't use a Getter for cache management. if ( readSlots < -1 ) readCache = CacheFactory.createNullCache() ; else readCache = CacheFactory.createCache(readSlots) ; if ( writeSlots <= 0 ) writeCache = null ; else { writeCache = CacheFactory.createCache(writeSlots) ; writeCache.setDropHandler((id, block) -> { // We're inside a synchronized operation at this point. log("Cache spill: write block: %d", id) ; if (block == null) { log.warn("Write cache: " + id + " dropping an entry that isn't there") ; return ; } // Force the block to be writtern // by sending it to the wrapped BlockMgr BlockMgrCache.super.write(block) ; } ) ; } }