| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.util.Maps.CacheStrategy<K,V,E>
oracle.javatools.util.Maps.BoundedLruCacheStrategy<K,V,E>
public static class Maps.BoundedLruCacheStrategy<K,V,E extends Maps.AbstractLinkedEntry<K,V>>
A bounded size LRU cache strategy.
Maps.AbstractCacheMap, 
Maps.CacheStrategy| Field Summary | 
|---|
| Fields inherited from class oracle.javatools.util.Maps.CacheStrategy | 
|---|
CANONICAL, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, HARD, NONCANONICAL, SOFT, WEAK | 
| Constructor Summary | |
|---|---|
Maps.BoundedLruCacheStrategy(int maximumSize)
Constructs a bounded LRU (least recently used), hard-referenced value, canonically mapped cache strategy.  | 
|
Maps.BoundedLruCacheStrategy(int maximumSize,
                             int initialCapacity,
                             float loadFactor,
                             Maps.AbstractCacheMap.ReferenceType valueReferenceType,
                             Maps.AbstractCacheMap.MappingType mappingType)
Constructs an unbounded cache strategy.  | 
|
| Method Summary | |
|---|---|
protected  boolean | 
evictEldest(Maps.AbstractCacheMap<K,V,E> map,
            E eldest)
Gets whether to evict the eldest entry from a cache.  | 
| Methods inherited from class oracle.javatools.util.Maps.CacheStrategy | 
|---|
entryAccessed, entryAdded, entryChanged, entryEvicted, entryPurged, entryRemoved, getInitialCapacity, getLoadFactor, getMappingType, getValueReferenceType, mapChanged | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Maps.BoundedLruCacheStrategy(int maximumSize)
maximumSize+1 and 1.0f, respectively, 
 which ensures that the map will not have to resize before reaching its 
 maximum size.
maximumSize - The maximum number of entries allowed in the map.
public Maps.BoundedLruCacheStrategy(int maximumSize,
                                    int initialCapacity,
                                    float loadFactor,
                                    Maps.AbstractCacheMap.ReferenceType valueReferenceType,
                                    Maps.AbstractCacheMap.MappingType mappingType)
| Method Detail | 
|---|
protected boolean evictEldest(Maps.AbstractCacheMap<K,V,E> map,
                              E eldest)
Maps.CacheStrategy.entryAdded(oracle.javatools.util.Maps.AbstractCacheMap, E)  is invoked, but not
 if Maps.CacheStrategy.entryAdded(oracle.javatools.util.Maps.AbstractCacheMap, E)  modifies the map.
 
 The Maps.CacheStrategy implementation returns false.
 
 The Maps.BoundedLruCacheStrategy implementation returns true if the
 added value has caused the map to exceed the maximum size.
evictEldest in class Maps.CacheStrategy<K,V,E extends Maps.AbstractLinkedEntry<K,V>>eldest - The eldest entry in the map, potentially to be evicted.
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||