| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.util.Maps.AbstractHashMap<K,V,E>
oracle.javatools.util.Maps.AbstractLinkedHashMap<K,V,E>
oracle.javatools.util.Maps.AbstractCacheMap<K,V,E>
public abstract static class Maps.AbstractCacheMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>
| Nested Class Summary | |
|---|---|
static class | 
Maps.AbstractCacheMap.MappingType
The types of references to values supported.  | 
static class | 
Maps.AbstractCacheMap.ReferenceType
The types of references to values supported.  | 
| Nested classes/interfaces inherited from interface java.util.Map | 
|---|
java.util.Map.Entry<K,V> | 
| Field Summary | |
|---|---|
static Maps.AbstractCacheMap.MappingType | 
CANONICAL
 | 
static Maps.AbstractCacheMap.ReferenceType | 
HARD
 | 
static Maps.AbstractCacheMap.MappingType | 
NONCANONICAL
 | 
static Maps.AbstractCacheMap.ReferenceType | 
SOFT
 | 
static Maps.AbstractCacheMap.ReferenceType | 
WEAK
 | 
| Fields inherited from class oracle.javatools.util.Maps.AbstractHashMap | 
|---|
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY | 
| Constructor Summary | |
|---|---|
Maps.AbstractCacheMap(Maps.CacheStrategy<K,V,E> strategy)
Constructs an empty cache map.  | 
|
| Method Summary | |
|---|---|
protected abstract  E | 
createDefaultEntry(int hashCode,
                   K key,
                   V value,
                   E next)
 | 
protected  E | 
createEntry(int hashCode,
            K key,
            V value,
            E next)
Creates an entry for this map.  | 
protected abstract  E | 
createSoftEntry(int hashCode,
                K key,
                V value,
                E next)
 | 
protected abstract  E | 
createWeakEntry(int hashCode,
                K key,
                V value,
                E next)
 | 
protected  void | 
entryAccessed(E entry)
Invoked when the value of an existing entry is accessed by Maps.AbstractHashMap.get(java.lang.Object). | 
protected  void | 
entryAdded(E entry)
Invoked when a new entry is added to this map.  | 
protected  void | 
entryChanged(E oldEntry,
             V oldValue,
             E newEntry)
Invoked when the value of an existing entry is changed.  | 
protected  void | 
entryEvicted(E entry)
Invoked when an existing entry is evicted by Maps.AbstractLinkedHashMap.evictExistingEntry(E),
 e.g., because Maps.AbstractLinkedHashMap.removeEldestEntry(E) returned true. | 
protected  void | 
entryPurged(E entry)
Invoked when an existing entry is purged by Maps.AbstractHashMap.purgeEntry(E) 
 after its value has been garbage collected. | 
protected  void | 
entryRemoved(E entry)
Invoked when an existing entry is removed by a remove method of this map, of a view collection of this map, or of an iterator of a view collection of this map  | 
protected  void | 
evictExistingEntry(E entry)
Evicts an existing entry from this map.  | 
 Maps.AbstractCacheMap.MappingType | 
getMappingType()
Gets the mapping type for this map. | 
 Maps.CacheStrategy<K,V,E> | 
getStrategy()
Gets the strategy used by this map.  | 
 Maps.AbstractCacheMap.ReferenceType | 
getValueReferenceType()
Gets the value reference type for this map. | 
protected  void | 
mapChanged()
Invoked when the map has changed.  | 
protected  boolean | 
removeEldestEntry(E eldest)
Gets whether to evict the eldest entry from this map.  | 
 void | 
setStrategy(Maps.CacheStrategy<K,V,E> strategy)
Sets the strategy used by this map.  | 
| 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 | 
| Field Detail | 
|---|
public static final Maps.AbstractCacheMap.ReferenceType HARD
public static final Maps.AbstractCacheMap.ReferenceType SOFT
public static final Maps.AbstractCacheMap.ReferenceType WEAK
public static final Maps.AbstractCacheMap.MappingType CANONICAL
public static final Maps.AbstractCacheMap.MappingType NONCANONICAL
| Constructor Detail | 
|---|
public Maps.AbstractCacheMap(Maps.CacheStrategy<K,V,E> strategy)
| Method Detail | 
|---|
public void setStrategy(Maps.CacheStrategy<K,V,E> strategy)
public Maps.CacheStrategy<K,V,E> getStrategy()
public Maps.AbstractCacheMap.ReferenceType getValueReferenceType()
reference type for this map.
public Maps.AbstractCacheMap.MappingType getMappingType()
mapping type for this map.
protected final E createEntry(int hashCode,
                              K key,
                              V value,
                              E next)
 The Maps.AbstractCacheMap implementation delegates to createDefaultEntry(int, K, V, E), createSoftEntry(int, K, V, E), or createWeakEntry(int, K, V, E) as indicated by getValueReferenceType().
createEntry in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>hashCode - The hashCode of the key for this entry.key - The key for this entry.value - The value for this entry.next - The entry to follow this entry in the entry chain.
protected abstract E createDefaultEntry(int hashCode,
                                        K key,
                                        V value,
                                        E next)
protected abstract E createSoftEntry(int hashCode,
                                     K key,
                                     V value,
                                     E next)
protected abstract E createWeakEntry(int hashCode,
                                     K key,
                                     V value,
                                     E next)
protected final void mapChanged()
Maps.AbstractLinkedHashMapMaps.AbstractHashMap.mapInitialized()), it only changes when entries are added or 
 removed. This method is invoked before the associated Maps.AbstractHashMap.entryAdded(E), Maps.AbstractHashMap.entryRemoved(E), or Maps.AbstractHashMap.entryAccessed(E) method is 
 invoked.
 
 The Maps.AbstractHashMap implementation does nothing.
 
 For subclasses of Maps.AbstractLinkedHashMap, this method is also 
 invoked when iteration order is by access and an entry is accessed.
 
Maps.AbstractLinkedHashMap implementation does nothing.
mapChanged in class Maps.AbstractLinkedHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>protected final void entryAdded(E entry)
Maps.AbstractHashMapMaps.AbstractHashMap.mapInitialized()), entries are only added
 by Maps.AbstractHashMap.put(K, V).
 
 The Maps.AbstractHashMap implementation does nothing.
entryAdded in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>
protected final void entryChanged(E oldEntry,
                                  V oldValue,
                                  E newEntry)
Maps.AbstractHashMapMaps.AbstractHashMap.mapInitialized()), entries are only changed 
 by Maps.AbstractHashMap.put(K, V).
 
 If the entry to change was mutable, its value is changed with Map.Entry#setValue and oldEntry and newEntry are the 
 same object. If the entry to change was not mutable, a new entry 
 must be created and oldEntry and newEntry are 
 different objects.
 
 When a client directly invokes the Map.Entry#setValue method of
 any of the Map.Entry implementations provided in this class,
 this method is not invoked (while this could be addressed, it would
 require each entry instance to hold a reference to its map).
 
 The Maps.AbstractHashMap implementation does nothing.
entryChanged in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>oldEntry - The existing entry that changed.oldValue - The old value of the entry.newEntry - The new entry, which may be the same as the old.protected final void entryAccessed(E entry)
Maps.AbstractHashMapMaps.AbstractHashMap.get(java.lang.Object).
 Access to an entry by iterating a view collection of this map does
 not cause this method to be invoked.
 
 The Maps.AbstractHashMap implementation does nothing.
entryAccessed in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>protected final void entryRemoved(E entry)
Maps.AbstractHashMap
 The Maps.AbstractHashMap implementation never invokes Maps.AbstractHashMap.entryRemoved(E) when entries are removed by the Maps.AbstractHashMap.clear() method of 
 this map, or of a view collection of this map.
 
 The Maps.AbstractHashMap implementation does nothing.
entryRemoved in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>protected final void entryPurged(E entry)
Maps.AbstractHashMapMaps.AbstractHashMap.purgeEntry(E) 
 after its value has been garbage collected. 
 
 The Maps.AbstractHashMap implementation only ever invokes
 Maps.AbstractHashMap.entryPurged(E) for entries which extend SoftReference or 
 WeakReference and which register themselves with the 
 ReferenceQueue returned by Maps.AbstractHashMap.getQueue(). Maps 
 provides four such classes: Maps.SoftEntry, Maps.WeakEntry, Maps.SoftLinkedEntry, and Maps.WeakLinkedEntry.
 
 The Maps.AbstractHashMap implementation does nothing.
entryPurged in class Maps.AbstractHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>protected final void entryEvicted(E entry)
Maps.AbstractLinkedHashMapMaps.AbstractLinkedHashMap.evictExistingEntry(E),
 e.g., because Maps.AbstractLinkedHashMap.removeEldestEntry(E) returned true. 
 
 The Maps.AbstractLinkedHashMap implementation does nothing.
entryEvicted in class Maps.AbstractLinkedHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>protected boolean removeEldestEntry(E eldest)
Maps.AbstractLinkedHashMapMaps.AbstractHashMap.entryAdded(E) is invoked. If
 Maps.AbstractHashMap.entryAdded(E) modifies the map, however, this method is not
 invoked. The removal of the entry, if requested, causes the Maps.AbstractLinkedHashMap.entryEvicted(E) method to be invoked, rather than the Maps.AbstractHashMap.entryRemoved(E) method. 
 
 The Maps.AbstractLinkedHashMap implementation returns false.
 
In an insertion-ordered map, the eldest entry is the least recently inserted one; in an access-ordered map, it is the least recently accessed entry.
 This method is provided for compatibility with LinkedHashMap.removeEldestEntry(java.util.Map.Entry.
removeEldestEntry in class Maps.AbstractLinkedHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>eldest - The eldest entry in the map.
protected void evictExistingEntry(E entry)
Maps.AbstractCacheMap implementation ensures that, if this map is
 canonical, the mapping represented by the evicted entry is retained for
 as long as an external reference to the value exists.
evictExistingEntry in class Maps.AbstractLinkedHashMap<K,V,E extends Maps.AbstractLinkedEntry<K,V>>entry - The entry to evict.
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||