com.samskivert.util
Interface LRUHashMap.ItemSizer<V>

Enclosing class:
LRUHashMap<K,V>

public static interface LRUHashMap.ItemSizer<V>

Used to return the "size" of a cache item for systems that wish to differentiate cache items based on memory footprint or other metric. The size will be used to scale up the size of a cache entry such that when the specified number of units is exceeded, the least recently used items will be flushed until the cache is back below its target size.


Method Summary
 int computeSize(V item)
          Returns the "size" of the specified object.
 

Method Detail

computeSize

int computeSize(V item)
Returns the "size" of the specified object.



Copyright © 2000-2008 Michael Bayne. All Rights Reserved.