org.exolab.castor.persist
Class LRU.NoCache

java.lang.Object
  extended by org.exolab.castor.persist.LRU
      extended by org.exolab.castor.persist.LRU.NoCache
Enclosing class:
LRU

public static class LRU.NoCache
extends LRU

NoCache is a Map which dispose all object right the way.

Every object being put in the Map will be disposed.

Method dispose(Object) will be called whenever an old object is diposed. Developer can get notify by overriding the dispose method dispose(Object).

Author:
Thomas Yip

Nested Class Summary
 
Nested classes/interfaces inherited from class org.exolab.castor.persist.LRU
LRU.CountLimited, LRU.NoCache, LRU.TimeLimited, LRU.Unlimited
 
Field Summary
 
Fields inherited from class org.exolab.castor.persist.LRU
CACHE_COUNT_LIMITED, CACHE_NONE, CACHE_TIME_LIMITED, CACHE_UNLIMITED, DEFAULT_PARAM, DEFAULT_TYPE
 
Constructor Summary
LRU.NoCache()
           
 
Method Summary
protected  void dispose(java.lang.Object o)
          This method is called when an object is disposed.
 java.util.Enumeration elements()
          Returns an enumeration of the values in this LRU map.
 java.lang.Object get(java.lang.Object key)
          Returns the value to which the specified key is mapped in this Map.
 java.lang.Object put(java.lang.Object key, java.lang.Object object)
          Maps the specified key to the specified value in this Map.
 java.lang.Object remove(java.lang.Object key)
          Removes the key (and its corresponding value) from this Map.
 
Methods inherited from class org.exolab.castor.persist.LRU
create, mapType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRU.NoCache

public LRU.NoCache()
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object object)
Maps the specified key to the specified value in this Map. Neither the key nor the value can be null. End of theory.

Every object being put in the Map will be disposed.

Specified by:
put in class LRU
Parameters:
key - the Map key.
value - the value.
Returns:
the previous value of the specified key in this Map, or null if it did not have one.
Throws:
java.lang.NullPointerException - if the key or value is null.

get

public java.lang.Object get(java.lang.Object key)
Returns the value to which the specified key is mapped in this Map.

Specified by:
get in class LRU
Parameters:
key - - a key in the Map.
Returns:
the value to which the key is mapped in this Map; null if the key is not mapped to any value in this Map.

remove

public java.lang.Object remove(java.lang.Object key)
Removes the key (and its corresponding value) from this Map. This method does nothing if the key is not in the Map.

Specified by:
remove in class LRU
Parameters:
key - the key that needs to be removed.
Returns:
the value to which the key had been mapped in this Map, or null if the key did not have a mapping.

elements

public java.util.Enumeration elements()
Returns an enumeration of the values in this LRU map. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Specified by:
elements in class LRU
Returns:
an enumeration of the values in this Map.
See Also:
Enumeration

dispose

protected void dispose(java.lang.Object o)
This method is called when an object is disposed. Override this method if you interested in the disposed object.



Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com