com.bankframe.services.cache.threadcleaned
Class ThreadCleanedCache

java.lang.Object
  extended bycom.bankframe.services.cache.GenericCache
      extended bycom.bankframe.services.cache.threadcleaned.ThreadCleanedCache
All Implemented Interfaces:
Cache, java.util.Map, NamedCache, PersistentCache
Direct Known Subclasses:
ThreadCleanedJMSCache

public class ThreadCleanedCache
extends GenericCache

This ThreadCleanedCache implementation uses a deamon thread to manage calls to its cleanup() implementation. This implementation does not call cleanup() on invocation of the following methods get(Object) put(Object,Object) putAll(Map) remove(Set) . It expects that all cleanup() calls will be invoked from the CacheFactory.CacheCleanUpThread instance. If this cache is used the ThreadCleanedCacheStartupClass must be invoked on server starup. Please refer to javadoc for ThreadCleanedCacheStartupClass for further details.


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
ThreadCleanedCache()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          This method retrieves the specified object, if it is not in the cacheit will be fetched from the data store.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          This method updates the specified object to the data-store.
 void putAll(java.util.Map values)
          This method places the specified values in the cache and the data-store.
 java.lang.Object remove(java.lang.Object key)
          This method removes the specified object from the cache and the data store.
 void remove(java.util.Set keySet)
          This method removes the specified keys from the cache and the data store.
 
Methods inherited from class com.bankframe.services.cache.GenericCache
addCacheListener, cleanup, clear, containsKey, containsValue, enableCaching, entrySet, equals, getCachePolicy, getFromPersistentMap, getName, getPersistentMap, hashCode, isEmpty, keySet, removeAll, removeCacheListener, setCachePolicy, setName, setPersistentMap, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadCleanedCache

public ThreadCleanedCache()
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Description copied from class: GenericCache
This method retrieves the specified object, if it is not in the cacheit will be fetched from the data store.

Specified by:
get in interface java.util.Map
Overrides:
get in class GenericCache
Parameters:
key - Unique key identifying the object
Returns:
Instance of the object

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from class: GenericCache
This method updates the specified object to the data-store. It also updates the reference stored in the cache. If the object does not exist in the data-store it will be created.

Specified by:
put in interface java.util.Map
Overrides:
put in class GenericCache
Parameters:
key - Unique key identifying the object
value - The object

putAll

public void putAll(java.util.Map values)
Description copied from class: GenericCache
This method places the specified values in the cache and the data-store. :param values a map of values to add to the cache.

Specified by:
putAll in interface java.util.Map
Overrides:
putAll in class GenericCache

remove

public java.lang.Object remove(java.lang.Object key)
Description copied from class: GenericCache
This method removes the specified object from the cache and the data store.

Specified by:
remove in interface java.util.Map
Overrides:
remove in class GenericCache
Parameters:
key - Unique key identifying the object to remove

remove

public void remove(java.util.Set keySet)
Description copied from class: GenericCache
This method removes the specified keys from the cache and the data store.

Specified by:
remove in interface Cache
Overrides:
remove in class GenericCache
Parameters:
keySet - the set of keys to remove


Copyright © 2005, 2007, Oracle. All rights reserved.