|
||||||||||
| 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
public class 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/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| 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(Object key)
|
boolean |
containsValue(Object value)
|
void |
enableCaching(boolean enableCache)
This method enables or disables caching. |
boolean |
equals(Object o)
|
Object |
get(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()
|
Object |
put(Object key,
Object value)
This method updates the specified object to the data-store. |
void |
putAll(Map values)
This method places the specified values in the cache and the data-store. |
Object |
remove(Object key)
This method removes the specified object from the cache and the data store. |
void |
remove(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()
|
Object |
removeDontSend(Object key)
|
void |
removeDontSend(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)
GenericCache
setCachePolicy in interface CachesetCachePolicy in class GenericCachepolicy - The new cache policypublic void removeAllDontSend()
removeAllDontSend in interface JMSCachepublic Object removeDontSend(Object key)
removeDontSend in interface JMSCachepublic void removeDontSend(Set keySet)
removeDontSend in interface JMSCachepublic Object get(Object key)
GenericCache
get in interface Mapget in class ThreadCleanedCachekey - Unique key identifying the object
public Object put(Object key,
Object value)
GenericCache
put in interface Mapput in class ThreadCleanedCachekey - Unique key identifying the objectvalue - The objectpublic void putAll(Map values)
GenericCache
putAll in interface MapputAll in class ThreadCleanedCachepublic Object remove(Object key)
GenericCache
remove in interface Mapremove in class ThreadCleanedCachekey - Unique key identifying the object to removepublic void remove(Set keySet)
GenericCache
remove in interface Cacheremove in class ThreadCleanedCachekeySet - the set of keys to removepublic void cleanup()
GenericCache
cleanup in interface Cachecleanup in class GenericCachepublic void clear()
GenericCache
clear in interface Mapclear in class GenericCachepublic boolean containsKey(Object key)
containsKey in interface 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(Object value)
containsValue in interface 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)
GenericCache
enableCaching in interface CacheenableCaching in class GenericCacheenableCache - true to enable, false to disablepublic boolean equals(Object o)
equals in interface Mapequals in class GenericCacheMappublic CachePolicy getCachePolicy()
GenericCache
getCachePolicy in interface CachegetCachePolicy in class GenericCachepublic int hashCode()
hashCode in interface MaphashCode in class GenericCacheMappublic void removeAll()
GenericCache
removeAll in interface CacheremoveAll in class GenericCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||