Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.util
Class Maps.CacheMap<K,V>

java.lang.Object
  extended by oracle.javatools.util.Maps.AbstractHashMap<K,V,E>
      extended by oracle.javatools.util.Maps.AbstractLinkedHashMap<K,V,E>
          extended by oracle.javatools.util.Maps.AbstractCacheMap<K,V,Maps.AbstractLinkedEntry<K,V>>
              extended by 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 Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.util.Maps.AbstractCacheMap
Maps.AbstractCacheMap.MappingType, Maps.AbstractCacheMap.ReferenceType
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class oracle.javatools.util.Maps.AbstractCacheMap
CANONICAL, HARD, NONCANONICAL, SOFT, WEAK
 
Fields inherited from class oracle.javatools.util.Maps.AbstractHashMap
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY
 
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.AbstractLinkedHashMap
clear, createEntryIterator, createEntrySetIterator, createKeySetIterator, createValuesIterator, getEldestEntry
 
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
 

Constructor Detail

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..

Method Detail

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>>

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.