oracle.javatools.util
Class Maps.CacheMap<K,V>
java.lang.Object
oracle.javatools.util.Maps.AbstractHashMap<K,V,E>
oracle.javatools.util.Maps.AbstractLinkedHashMap<K,V,E>
oracle.javatools.util.Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
oracle.javatools.util.Maps.CacheMap<K,V>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
- Direct Known Subclasses:
- Maps.ManagedCacheMap
- Enclosing class:
- Maps
public static class Maps.CacheMap<K,V>
- extends Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Constructor Summary |
Maps.CacheMap()
Constructs an unbounded, hard-referenced value cache map. |
Maps.CacheMap(int bound)
Constructs a bounded LRU (least recently used), hard-referenced cache
map. |
Maps.CacheMap(int bound,
Maps.AbstractCacheMap.MappingType mappingType)
Constructs a bounded LRU (least recently used), hard-referenced,
canonically-mapped, cache map. |
Maps.CacheMap(int bound,
Maps.AbstractCacheMap.ReferenceType valueReferenceType)
Constructs a bounded LRU (least recently used), hard-referenced cache
map. |
Maps.CacheMap(Maps.AbstractCacheMap.ReferenceType valueReferenceType)
Constructs an unbounded cache map of specified value reference type. |
Maps.CacheMap(Maps.CacheStrategy<K,V,Maps.AbstractLinkedEntry<K,V>> strategy)
Constructs a cache map with specified Maps.CacheStrategy .. |
Method Summary |
protected Maps.AbstractLinkedEntry<K,V> |
createDefaultEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
|
protected Maps.AbstractLinkedEntry<K,V> |
createSoftEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
|
protected Maps.AbstractLinkedEntry<K,V> |
createWeakEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
|
Methods inherited from class oracle.javatools.util.Maps.AbstractCacheMap |
createEntry, entryAccessed, entryAdded, entryChanged, entryEvicted, entryPurged, entryRemoved, evictExistingEntry, getMappingType, getStrategy, getValueReferenceType, mapChanged, removeEldestEntry, setStrategy |
Methods inherited from class oracle.javatools.util.Maps.AbstractHashMap |
addEntry, capacity, change, clone, containsKey, containsValue, entrySet, equals, get, getChangeCount, getEntry, getQueue, hashCode, isEmpty, keyEquals, keyHashCode, keySet, loadFactor, mapConstructed, mapInitialized, purge, purgeEntry, put, putAll, remove, removeExistingEntry, removeKey, size, toString, valueEquals, valueHashCode, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Maps.CacheMap
public Maps.CacheMap()
- Constructs an unbounded, hard-referenced value cache map. The initial
capacity and load factor are set to default values; the mapping type
is noncanonical (as is typical for an unbounded cache).
Maps.CacheMap
public Maps.CacheMap(Maps.AbstractCacheMap.ReferenceType valueReferenceType)
- Constructs an unbounded cache map of specified value reference type. The
initial capacity and load factor are set to default values; the mapping
type is noncanonical (as is typical for an unbounded cache).
Maps.CacheMap
public Maps.CacheMap(int bound)
- Constructs a bounded LRU (least recently used), hard-referenced cache
map. The initial capacity and load factor are set to default values;
the mapping type is canonical.
- Parameters:
bound
- The maximum number of values to cache.
Maps.CacheMap
public Maps.CacheMap(int bound,
Maps.AbstractCacheMap.ReferenceType valueReferenceType)
- Constructs a bounded LRU (least recently used), hard-referenced cache
map. The initial capacity and load factor are set to default values;
the mapping type is canonical.
- Parameters:
bound
- The maximum number of values to cache.
Maps.CacheMap
public Maps.CacheMap(int bound,
Maps.AbstractCacheMap.MappingType mappingType)
- Constructs a bounded LRU (least recently used), hard-referenced,
canonically-mapped, cache map. The initial capacity and load factor are
set to default values.
- Parameters:
bound
- The maximum number of values to cache.
Maps.CacheMap
public Maps.CacheMap(Maps.CacheStrategy<K,V,Maps.AbstractLinkedEntry<K,V>> strategy)
- Constructs a cache map with specified
Maps.CacheStrategy
..
createDefaultEntry
protected Maps.AbstractLinkedEntry<K,V> createDefaultEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
- Specified by:
createDefaultEntry
in class Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
createSoftEntry
protected Maps.AbstractLinkedEntry<K,V> createSoftEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
- Specified by:
createSoftEntry
in class Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
createWeakEntry
protected Maps.AbstractLinkedEntry<K,V> createWeakEntry(int hashCode,
K key,
V value,
Maps.AbstractLinkedEntry<K,V> next)
- Specified by:
createWeakEntry
in class Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
Copyright © 1997, 2010, Oracle. All rights reserved.