Java Doc for AbstractConcurrentReadCache.java in  » Cache » OSCache » com » opensymphony » oscache » base » algorithm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Cache » OSCache » com.opensymphony.oscache.base.algorithm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.AbstractMap
      com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache

All known Subclasses:   com.opensymphony.oscache.base.algorithm.UnlimitedCache,  com.opensymphony.oscache.base.algorithm.LRUCache,  com.opensymphony.oscache.base.algorithm.FIFOCache,
AbstractConcurrentReadCache
abstract public class AbstractConcurrentReadCache extends AbstractMap implements Map,Cloneable,Serializable(Code)
A version of Hashtable that supports mostly-concurrent reading, but exclusive writing. Because reads are not limited to periods without writes, a concurrent reader policy is weaker than a classic reader/writer policy, but is generally faster and allows more concurrency. This class is a good choice especially for tables that are mainly created by one thread during the start-up phase of a program, and from then on, are mainly read (with perhaps occasional additions or removals) in many threads. If you also need concurrency among writes, consider instead using ConcurrentHashMap.

Successful retrievals using get(key) and containsKey(key) usually run without locking. Unsuccessful ones (i.e., when the key is not present) do involve brief synchronization (locking). Also, the size and isEmpty methods are always synchronized.

Because retrieval operations can ordinarily overlap with writing operations (i.e., put, remove, and their derivatives), retrievals can only be guaranteed to return the results of the most recently completed operations holding upon their onset. Retrieval operations may or may not return results reflecting in-progress writing operations. However, the retrieval operations do always return consistent results -- either those holding before any single modification or after it, but never a nonsense result. For aggregate operations such as putAll and clear, concurrent reads may reflect insertion or removal of only some entries. In those rare contexts in which you use a hash table to synchronize operations across threads (for example, to prevent reads until after clears), you should either encase operations in synchronized blocks, or instead use java.util.Hashtable.

This class also supports optional guaranteed exclusive reads, simply by surrounding a call within a synchronized block, as in
AbstractConcurrentReadCache t; ... Object v;
synchronized(t) { v = t.get(k); }

But this is not usually necessary in practice. For example, it is generally inefficient to write:

 AbstractConcurrentReadCache t; ...            // Inefficient version
 Object key; ...
 Object value; ...
 synchronized(t) {
 if (!t.containsKey(key))
 t.put(key, value);
 // other code if not previously present
 }
 else {
 // other code if it was previously present
 }
 }
 
Instead, just take advantage of the fact that put returns null if the key was not previously present:
 AbstractConcurrentReadCache t; ...                // Use this instead
 Object key; ...
 Object value; ...
 Object oldValue = t.put(key, value);
 if (oldValue == null) {
 // other code if not previously present
 }
 else {
 // other code if it was previously present
 }
 

Iterators and Enumerations (i.e., those returned by keySet().iterator(), entrySet().iterator(), values().iterator(), keys(), and elements()) return elements reflecting the state of the hash table at some point at or since the creation of the iterator/enumeration. They will return at most one instance of each element (via next()/nextElement()), but might or might not reflect puts and removes that have been processed since they were created. They do not throw ConcurrentModificationException. However, these iterators are designed to be used by only one thread at a time. Sharing an iterator across multiple threads may lead to unpredictable results if the table is being concurrently modified. Again, you can ensure interference-free iteration by enclosing the iteration in a synchronized block.

This class may be used as a direct replacement for any use of java.util.Hashtable that does not depend on readers being blocked during updates. Like Hashtable but unlike java.util.HashMap, this class does NOT allow null to be used as a key or value. This class is also typically faster than ConcurrentHashMap when there is usually only one thread updating the table, but possibly many retrieving values from it.

Implementation note: A slightly faster implementation of this class will be possible once planned Java Memory Model revisions are in place.

[ Introduction to this package. ]


Inner Class :protected static class Entry implements Map.Entry
Inner Class :protected class HashIterator implements Iterator,Enumeration
Inner Class :protected class KeyIterator extends HashIterator
Inner Class :protected class ValueIterator extends HashIterator

Field Summary
final public static  intDEFAULT_INITIAL_CAPACITY
     The default initial number of table slots for this table (32).
final public static  floatDEFAULT_LOAD_FACTOR
     The default load factor for this table.
final protected  intDEFAULT_MAX_ENTRIES
     Default cache capacity (number of entries).
final protected static  StringNULL
    
final protected  intUNLIMITED
     Max number of element in cache when considered unlimited.
final protected  BooleanbarrierLock
     Lock used only for its memory effects.
protected transient  intcount
     The total number of mappings in the hash table.
protected transient  SetentrySet
    
protected  HashMapgroups
     A HashMap containing the group information.
protected transient  SetkeySet
    
protected transient  ObjectlastWrite
     field written to only to guarantee lock ordering.
protected  floatloadFactor
     The load factor for the hash table.
protected  intmaxEntries
     Cache capacity (number of entries).
protected  booleanmemoryCaching
     Use memory cache or not.
protected transient  PersistenceListenerpersistenceListener
     Persistence listener.
protected transient  Entry[]table
     The hash table data.
protected  intthreshold
     The table is rehashed when its size exceeds this threshold.
protected  booleanunlimitedDiskCache
     Use unlimited disk caching.
protected transient  Collectionvalues
    

Constructor Summary
public  AbstractConcurrentReadCache(int initialCapacity, float loadFactor)
     Constructs a new, empty map with the specified initial capacity and the specified load factor.
public  AbstractConcurrentReadCache(int initialCapacity)
     Constructs a new, empty map with the specified initial capacity and default load factor.
public  AbstractConcurrentReadCache()
     Constructs a new, empty map with a default initial capacity and load factor.
public  AbstractConcurrentReadCache(Map t)
     Constructs a new map with the same mappings as the given map.

Method Summary
public synchronized  intcapacity()
     Return the number of slots in this table.
public synchronized  voidclear()
     Removes all mappings from this map.
public synchronized  Objectclone()
     Returns a shallow copy of this.
public  booleancontains(Object value)
     Tests if some key maps into the specified value in this table. This operation is more expensive than the containsKey method.

Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
Parameters:
  value - a value to search for.

public  booleancontainsKey(Object key)
     Tests if the specified object is a key in this table.
Parameters:
  key - possible key.
public  booleancontainsValue(Object value)
     Returns true if this map maps one or more keys to the specified value.
public  Enumerationelements()
     Returns an enumeration of the values in this table.
public  SetentrySet()
     Returns a collection view of the mappings contained in this map. Each element in the returned collection is a Map.Entry.
protected synchronized  booleanfindAndRemoveEntry(Map.Entry entry)
     Helper method for entrySet remove.
public  Objectget(Object key)
     Returns the value to which the specified key is mapped in this table.
Parameters:
  key - a key in the table.
public  SetgetGroup(String groupName)
     Returns a set of the cache keys that reside in a particular group.
Parameters:
  groupName - The name of the group to retrieve.
final protected synchronized  SetgetGroupForReading(String groupName)
     Get ref to group. CACHE-127 Synchronized copying of the group entry set since the new HashSet(Collection c) constructor uses the iterator. This may slow things down but it is better than a ConcurrentModificationException.
final protected  MapgetGroupsForReading()
     Get ref to groups.
public  intgetMaxEntries()
     Retrieve the cache capacity (number of entries).
public  PersistenceListenergetPersistenceListener()
     Get the persistence listener.
final protected  Entry[]getTableForReading()
    
public synchronized  booleanisEmpty()
     Returns true if this map contains no key-value mappings.
public  booleanisMemoryCaching()
     Check if memory caching is used.
public  booleanisOverflowPersistence()
    
public  booleanisUnlimitedDiskCache()
     Check if we use unlimited disk cache.
abstract protected  voiditemPut(Object key)
     Notify the underlying implementation that an item was put in the cache.
abstract protected  voiditemRemoved(Object key)
     Notify the underlying implementation that an item was removed from the cache.
abstract protected  voiditemRetrieved(Object key)
     Notify any underlying algorithm that an item has been retrieved from the cache.
public  SetkeySet()
     Returns a set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa.
public  Enumerationkeys()
     Returns an enumeration of the keys in this table.
public  floatloadFactor()
    
protected  voidpersistClear()
     Removes the entire cache from persistent storage.
protected  voidpersistRemove(Object key)
     Remove an object from the persistence.
protected  voidpersistRemoveGroup(String groupName)
     Removes a cache group using the persistence listener.
protected  ObjectpersistRetrieve(Object key)
     Retrieve an object from the persistence listener.
protected  SetpersistRetrieveGroup(String groupName)
     Retrieves a cache group using the persistence listener.
protected  voidpersistStore(Object key, Object obj)
     Store an object in the cache using the persistence listener.
protected  voidpersistStoreGroup(String groupName, Set group)
     Creates or Updates a cache group using the persistence listener.
public  Objectput(Object key, Object value)
    
public synchronized  voidputAll(Map t)
     Copies all of the mappings from the specified map to this one.
final protected  voidrecordModification(Object x)
     Force a memory synchronization that will cause all readers to see table.
protected  voidrehash()
     Rehashes the contents of this map into a new table with a larger capacity.
public  Objectremove(Object key)
    
public  ObjectremoveForce(Object key)
     Like remove(Object), but ensures that the entry will be removed from the persistent store, too, even if overflowPersistence or unlimitedDiskcache are true.
Parameters:
  key - the key that needs to be removed.
abstract protected  ObjectremoveItem()
     The cache has reached its cacpacity and an item needs to be removed.
public  voidsetMaxEntries(int newLimit)
    
public  voidsetMemoryCaching(boolean memoryCaching)
     Sets the memory caching flag.
public  voidsetOverflowPersistence(boolean overflowPersistence)
    
public  voidsetPersistenceListener(PersistenceListener listener)
     Set the persistence listener to use.
public  voidsetUnlimitedDiskCache(boolean unlimitedDiskCache)
     Sets the unlimited disk caching flag.
public synchronized  intsize()
     Returns the total number of cache entries held in this map.
protected  Objectsput(Object key, Object value, int hash, boolean persist)
    
protected  Objectsremove(Object key, int hash, boolean invokeAlgorithm)
    
public  Collectionvalues()
     Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa.

Field Detail
DEFAULT_INITIAL_CAPACITY
final public static int DEFAULT_INITIAL_CAPACITY(Code)
The default initial number of table slots for this table (32). Used when not otherwise specified in constructor.



DEFAULT_LOAD_FACTOR
final public static float DEFAULT_LOAD_FACTOR(Code)
The default load factor for this table. Used when not otherwise specified in constructor, the default is 0.75f.



DEFAULT_MAX_ENTRIES
final protected int DEFAULT_MAX_ENTRIES(Code)
Default cache capacity (number of entries).



NULL
final protected static String NULL(Code)



UNLIMITED
final protected int UNLIMITED(Code)
Max number of element in cache when considered unlimited.



barrierLock
final protected Boolean barrierLock(Code)
Lock used only for its memory effects. We use a Boolean because it is serializable, and we create a new one because we need a unique object for each cache instance.



count
protected transient int count(Code)
The total number of mappings in the hash table.



entrySet
protected transient Set entrySet(Code)



groups
protected HashMap groups(Code)
A HashMap containing the group information. Each entry uses the group name as the key, and holds a Set of containing keys of all the cache entries that belong to that particular group.



keySet
protected transient Set keySet(Code)



lastWrite
protected transient Object lastWrite(Code)
field written to only to guarantee lock ordering.



loadFactor
protected float loadFactor(Code)
The load factor for the hash table.



maxEntries
protected int maxEntries(Code)
Cache capacity (number of entries).



memoryCaching
protected boolean memoryCaching(Code)
Use memory cache or not.



persistenceListener
protected transient PersistenceListener persistenceListener(Code)
Persistence listener.



table
protected transient Entry[] table(Code)
The hash table data.



threshold
protected int threshold(Code)
The table is rehashed when its size exceeds this threshold. (The value of this field is always (int)(capacity * loadFactor).)



unlimitedDiskCache
protected boolean unlimitedDiskCache(Code)
Use unlimited disk caching.



values
protected transient Collection values(Code)




Constructor Detail
AbstractConcurrentReadCache
public AbstractConcurrentReadCache(int initialCapacity, float loadFactor)(Code)
Constructs a new, empty map with the specified initial capacity and the specified load factor.
Parameters:
  initialCapacity - the initial capacityThe actual initial capacity is rounded to the nearest power of two.
Parameters:
  loadFactor - the load factor of the AbstractConcurrentReadCache
throws:
  IllegalArgumentException - if the initial maximum numberof elements is lessthan zero, or if the load factor is nonpositive.



AbstractConcurrentReadCache
public AbstractConcurrentReadCache(int initialCapacity)(Code)
Constructs a new, empty map with the specified initial capacity and default load factor.
Parameters:
  initialCapacity - the initial capacity of theAbstractConcurrentReadCache.
throws:
  IllegalArgumentException - if the initial maximum numberof elements is lessthan zero.



AbstractConcurrentReadCache
public AbstractConcurrentReadCache()(Code)
Constructs a new, empty map with a default initial capacity and load factor.



AbstractConcurrentReadCache
public AbstractConcurrentReadCache(Map t)(Code)
Constructs a new map with the same mappings as the given map. The map is created with a capacity of twice the number of mappings in the given map or 11 (whichever is greater), and a default load factor.




Method Detail
capacity
public synchronized int capacity()(Code)
Return the number of slots in this table.



clear
public synchronized void clear()(Code)
Removes all mappings from this map.



clone
public synchronized Object clone()(Code)
Returns a shallow copy of this. AbstractConcurrentReadCache instance: the keys and values themselves are not cloned. a shallow copy of this map.



contains
public boolean contains(Object value)(Code)
Tests if some key maps into the specified value in this table. This operation is more expensive than the containsKey method.

Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
Parameters:
  value - a value to search for. true if and only if some key maps to thevalue argument in this table asdetermined by the equals method;false otherwise.
exception:
  NullPointerException - if the value is null.
See Also:   AbstractConcurrentReadCache.containsKey(Object)
See Also:   AbstractConcurrentReadCache.containsValue(Object)
See Also:   Map




containsKey
public boolean containsKey(Object key)(Code)
Tests if the specified object is a key in this table.
Parameters:
  key - possible key. true if and only if the specified objectis a key in this table, as determined by theequals method; false otherwise.
exception:
  NullPointerException - if the key isnull.
See Also:   AbstractConcurrentReadCache.contains(Object)



containsValue
public boolean containsValue(Object value)(Code)
Returns true if this map maps one or more keys to the specified value. Note: This method requires a full internal traversal of the hash table, and so is much slower than method containsKey.
Parameters:
  value - value whose presence in this map is to be tested. true if this map maps one or more keys to thespecified value.
exception:
  NullPointerException - if the value is null.



elements
public Enumeration elements()(Code)
Returns an enumeration of the values in this table. Use the Enumeration methods on the returned object to fetch the elements sequentially. an enumeration of the values in this table.
See Also:   java.util.Enumeration
See Also:   AbstractConcurrentReadCache.keys()
See Also:   AbstractConcurrentReadCache.values()
See Also:   Map



entrySet
public Set entrySet()(Code)
Returns a collection view of the mappings contained in this map. Each element in the returned collection is a Map.Entry. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations. a collection view of the mappings contained in this map.



findAndRemoveEntry
protected synchronized boolean findAndRemoveEntry(Map.Entry entry)(Code)
Helper method for entrySet remove.



get
public Object get(Object key)(Code)
Returns the value to which the specified key is mapped in this table.
Parameters:
  key - a key in the table. the value to which the key is mapped in this table;null if the key is not mapped to any value inthis table.
exception:
  NullPointerException - if the key isnull.
See Also:   AbstractConcurrentReadCache.put(Object,Object)



getGroup
public Set getGroup(String groupName)(Code)
Returns a set of the cache keys that reside in a particular group.
Parameters:
  groupName - The name of the group to retrieve. a set containing all of the keys of cache entries that belongto this group, or null if the group was not found.
exception:
  NullPointerException - if the groupName is null.



getGroupForReading
final protected synchronized Set getGroupForReading(String groupName)(Code)
Get ref to group. CACHE-127 Synchronized copying of the group entry set since the new HashSet(Collection c) constructor uses the iterator. This may slow things down but it is better than a ConcurrentModificationException. We might have to revisit the code if performance is too adversely impacted.



getGroupsForReading
final protected Map getGroupsForReading()(Code)
Get ref to groups. The reference and the cells it accesses will be at least as fresh as from last use of barrierLock



getMaxEntries
public int getMaxEntries()(Code)
Retrieve the cache capacity (number of entries).



getPersistenceListener
public PersistenceListener getPersistenceListener()(Code)
Get the persistence listener.



getTableForReading
final protected Entry[] getTableForReading()(Code)
Get ref to table; the reference and the cells it accesses will be at least as fresh as from last use of barrierLock



isEmpty
public synchronized boolean isEmpty()(Code)
Returns true if this map contains no key-value mappings. true if this map contains no key-value mappings.



isMemoryCaching
public boolean isMemoryCaching()(Code)
Check if memory caching is used.



isOverflowPersistence
public boolean isOverflowPersistence()(Code)
Check if we use overflowPersistence Returns the overflowPersistence.



isUnlimitedDiskCache
public boolean isUnlimitedDiskCache()(Code)
Check if we use unlimited disk cache.



itemPut
abstract protected void itemPut(Object key)(Code)
Notify the underlying implementation that an item was put in the cache.
Parameters:
  key - The cache key of the item that was put.



itemRemoved
abstract protected void itemRemoved(Object key)(Code)
Notify the underlying implementation that an item was removed from the cache.
Parameters:
  key - The cache key of the item that was removed.



itemRetrieved
abstract protected void itemRetrieved(Object key)(Code)
Notify any underlying algorithm that an item has been retrieved from the cache.
Parameters:
  key - The cache key of the item that was retrieved.



keySet
public Set keySet()(Code)
Returns a set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations. a set view of the keys contained in this map.



keys
public Enumeration keys()(Code)
Returns an enumeration of the keys in this table. an enumeration of the keys in this table.
See Also:   Enumeration
See Also:   AbstractConcurrentReadCache.elements()
See Also:   AbstractConcurrentReadCache.keySet()
See Also:   Map



loadFactor
public float loadFactor()(Code)
Return the load factor



persistClear
protected void persistClear()(Code)
Removes the entire cache from persistent storage.



persistRemove
protected void persistRemove(Object key)(Code)
Remove an object from the persistence.
Parameters:
  key - The key of the object to remove



persistRemoveGroup
protected void persistRemoveGroup(String groupName)(Code)
Removes a cache group using the persistence listener.
Parameters:
  groupName - The name of the group to remove



persistRetrieve
protected Object persistRetrieve(Object key)(Code)
Retrieve an object from the persistence listener.
Parameters:
  key - The key of the object to retrieve



persistRetrieveGroup
protected Set persistRetrieveGroup(String groupName)(Code)
Retrieves a cache group using the persistence listener.
Parameters:
  groupName - The name of the group to retrieve



persistStore
protected void persistStore(Object key, Object obj)(Code)
Store an object in the cache using the persistence listener.
Parameters:
  key - The object key
Parameters:
  obj - The object to store



persistStoreGroup
protected void persistStoreGroup(String groupName, Set group)(Code)
Creates or Updates a cache group using the persistence listener.
Parameters:
  groupName - The name of the group to update
Parameters:
  group - The entries for the group



put
public Object put(Object key, Object value)(Code)
OpenSymphony BEGIN



putAll
public synchronized void putAll(Map t)(Code)
Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified Map.
Parameters:
  t - Mappings to be stored in this map.



recordModification
final protected void recordModification(Object x)(Code)
Force a memory synchronization that will cause all readers to see table. Call only when already holding main synch lock.



rehash
protected void rehash()(Code)
Rehashes the contents of this map into a new table with a larger capacity. This method is called automatically when the number of keys in this map exceeds its capacity and load factor.



remove
public Object remove(Object key)(Code)
OpenSymphony BEGIN



removeForce
public Object removeForce(Object key)(Code)
Like remove(Object), but ensures that the entry will be removed from the persistent store, too, even if overflowPersistence or unlimitedDiskcache are true.
Parameters:
  key - the key that needs to be removed. the value to which the key had been mapped in this table,or null if the key did not have a mapping.



removeItem
abstract protected Object removeItem()(Code)
The cache has reached its cacpacity and an item needs to be removed. (typically according to an algorithm such as LRU or FIFO). The key of whichever item was removed.



setMaxEntries
public void setMaxEntries(int newLimit)(Code)
Set the cache capacity



setMemoryCaching
public void setMemoryCaching(boolean memoryCaching)(Code)
Sets the memory caching flag.



setOverflowPersistence
public void setOverflowPersistence(boolean overflowPersistence)(Code)
Sets the overflowPersistence flag
Parameters:
  overflowPersistence - The overflowPersistence to set.



setPersistenceListener
public void setPersistenceListener(PersistenceListener listener)(Code)
Set the persistence listener to use.



setUnlimitedDiskCache
public void setUnlimitedDiskCache(boolean unlimitedDiskCache)(Code)
Sets the unlimited disk caching flag.



size
public synchronized int size()(Code)
Returns the total number of cache entries held in this map. the number of key-value mappings in this map.



sput
protected Object sput(Object key, Object value, int hash, boolean persist)(Code)
OpenSymphony BEGIN



sremove
protected Object sremove(Object key, int hash, boolean invokeAlgorithm)(Code)
OpenSymphony BEGIN



values
public Collection values()(Code)
Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations. a collection view of the values contained in this map.



Methods inherited from java.util.AbstractMap
public void clear()(Code)(Java Doc)
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean containsKey(Object key)(Code)(Java Doc)
public boolean containsValue(Object value)(Code)(Java Doc)
abstract public Set<Entry<K, V>> entrySet()(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
public V get(Object key)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public Set<K> keySet()(Code)(Java Doc)
public V put(K key, V value)(Code)(Java Doc)
public void putAll(Map<? extends K, ? extends V> m)(Code)(Java Doc)
public V remove(Object key)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public Collection<V> values()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.