|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.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 CachesetCachePolicy in class GenericCachepolicy - The new cache policypublic void removeAllDontSend()
removeAllDontSend in interface JMSCachepublic java.lang.Object removeDontSend(java.lang.Object key)
removeDontSend in interface JMSCachepublic void removeDontSend(java.util.Set keySet)
removeDontSend in interface JMSCachepublic java.lang.Object get(java.lang.Object key)
GenericCache
get in interface java.util.Mapget in class ThreadCleanedCache
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
GenericCache
put in interface java.util.Mapput in class ThreadCleanedCachepublic void putAll(java.util.Map values)
GenericCache
putAll in interface java.util.MapputAll in class ThreadCleanedCachepublic java.lang.Object remove(java.lang.Object key)
GenericCache
remove in interface java.util.Mapremove in class ThreadCleanedCachepublic void remove(java.util.Set keySet)
Cache
remove in interface Cacheremove in class ThreadCleanedCachepublic void cleanup()
Cache
cleanup in interface Cachecleanup in class GenericCachepublic void clear()
GenericCache
clear in interface java.util.Mapclear in class GenericCachepublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapcontainsKey in class GenericCacheInvokes 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.MapcontainsValue in class GenericCacheNote 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 CacheenableCaching in class GenericCacheenableCache - true to enable, false to disablepublic boolean equals(java.lang.Object o)
equals in interface java.util.Mapequals in class GenericCacheMappublic CachePolicy getCachePolicy()
Cache
getCachePolicy in interface CachegetCachePolicy in class GenericCachepublic int hashCode()
hashCode in interface java.util.MaphashCode in class GenericCacheMappublic void removeAll()
Cache
removeAll in interface CacheremoveAll in class GenericCache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||