|
||||||||||
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 Cache
setCachePolicy
in class GenericCache
policy
- The new cache policypublic void removeAllDontSend()
removeAllDontSend
in interface JMSCache
public Object removeDontSend(Object key)
removeDontSend
in interface JMSCache
public void removeDontSend(Set keySet)
removeDontSend
in interface JMSCache
public Object get(Object key)
GenericCache
get
in interface Map
get
in class ThreadCleanedCache
key
- Unique key identifying the object
public Object put(Object key, Object value)
GenericCache
put
in interface Map
put
in class ThreadCleanedCache
key
- Unique key identifying the objectvalue
- The objectpublic void putAll(Map values)
GenericCache
putAll
in interface Map
putAll
in class ThreadCleanedCache
public Object remove(Object key)
GenericCache
remove
in interface Map
remove
in class ThreadCleanedCache
key
- Unique key identifying the object to removepublic void remove(Set keySet)
GenericCache
remove
in interface Cache
remove
in class ThreadCleanedCache
keySet
- the set of keys to removepublic void cleanup()
GenericCache
cleanup
in interface Cache
cleanup
in class GenericCache
public void clear()
GenericCache
clear
in interface Map
clear
in class GenericCache
public boolean containsKey(Object key)
containsKey
in interface 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(Object value)
containsValue
in interface 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)
GenericCache
enableCaching
in interface Cache
enableCaching
in class GenericCache
enableCache
- true to enable, false to disablepublic boolean equals(Object o)
equals
in interface Map
equals
in class GenericCache
Map
public CachePolicy getCachePolicy()
GenericCache
getCachePolicy
in interface Cache
getCachePolicy
in class GenericCache
public int hashCode()
hashCode
in interface Map
hashCode
in class GenericCache
Map
public void removeAll()
GenericCache
removeAll
in interface Cache
removeAll
in class GenericCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |