|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.services.cache.GenericCache com.bankframe.services.cache.threadcleaned.ThreadCleanedCache com.bankframe.services.cache.threadcleaned.ThreadCleanedJMSCache
The ThreadCleanedJMSCache class provides generic caching functionality using a distributed cache within a multi-JVM environment. The cleaning up of this cache is performed by the ThreadCleanedGenericCacheStartUp class.
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
ThreadCleanedJMSCache()
|
Method Summary | |
void |
cleanup()
This method cleans up the cache by removing un-needed entries |
void |
clear()
This method clears the cache. |
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
void |
enableCaching(boolean enableCache)
This method enables or disables caching. |
boolean |
equals(java.lang.Object o)
|
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. |
CachePolicy |
getCachePolicy()
This method gets the CachePolicy object for this Cache |
int |
hashCode()
|
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 |
void |
removeAll()
Removes all objects from the cache and from the data store. |
void |
removeAllDontSend()
|
java.lang.Object |
removeDontSend(java.lang.Object key)
|
void |
removeDontSend(java.util.Set keySet)
|
void |
setCachePolicy(CachePolicy policy)
This method sets the CachePolicy object for this Cache |
Methods inherited from class com.bankframe.services.cache.GenericCache |
addCacheListener, entrySet, getFromPersistentMap, getName, getPersistentMap, isEmpty, keySet, removeCacheListener, setName, setPersistentMap, size, toString, values |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.bankframe.services.cache.Cache |
addCacheListener, removeCacheListener |
Methods inherited from interface java.util.Map |
entrySet, isEmpty, keySet, size, values |
Constructor Detail |
public ThreadCleanedJMSCache()
Method Detail |
public void setCachePolicy(CachePolicy policy)
Cache
setCachePolicy
in interface Cache
setCachePolicy
in class GenericCache
policy
- The new cache policypublic void removeAllDontSend()
removeAllDontSend
in interface JMSCache
public java.lang.Object removeDontSend(java.lang.Object key)
removeDontSend
in interface JMSCache
public void removeDontSend(java.util.Set keySet)
removeDontSend
in interface JMSCache
public java.lang.Object get(java.lang.Object key)
GenericCache
get
in interface java.util.Map
get
in class ThreadCleanedCache
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
GenericCache
put
in interface java.util.Map
put
in class ThreadCleanedCache
public void putAll(java.util.Map values)
GenericCache
putAll
in interface java.util.Map
putAll
in class ThreadCleanedCache
public java.lang.Object remove(java.lang.Object key)
GenericCache
remove
in interface java.util.Map
remove
in class ThreadCleanedCache
public void remove(java.util.Set keySet)
Cache
remove
in interface Cache
remove
in class ThreadCleanedCache
public void cleanup()
Cache
cleanup
in interface Cache
cleanup
in class GenericCache
public void clear()
GenericCache
clear
in interface java.util.Map
clear
in class GenericCache
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in class GenericCache
Invokes this.get(Object key) and checks if value returned is null. This will ensure that if an entry exists
and a cache policy is used, the entry timeout will be updated so it is available for use again.
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class GenericCache
Note that the cache may contain the value, but the key may have expired and is due to be removed.
This means that the cache may not have the value the next time this method is called.
public void enableCaching(boolean enableCache)
Cache
enableCaching
in interface Cache
enableCaching
in class GenericCache
enableCache
- true to enable, false to disablepublic boolean equals(java.lang.Object o)
equals
in interface java.util.Map
equals
in class GenericCache
Map
public CachePolicy getCachePolicy()
Cache
getCachePolicy
in interface Cache
getCachePolicy
in class GenericCache
public int hashCode()
hashCode
in interface java.util.Map
hashCode
in class GenericCache
Map
public void removeAll()
Cache
removeAll
in interface Cache
removeAll
in class GenericCache
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |