|
|||||||||||
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.MergedDataPacketsCache
The class is a specialisation of the GenericCache class. When a put() or putAll() method is invoked where the values are DataPackets then if a matching key already exists then the old DataPacket value and the new DataPacket value are merged.
Where a field in the DataPacket exists in both the old and the new version the old value of the field is overwritten with the new value of the field.
With GenericCache the old DataPacket value is simply overwritten with the new value.
To configure a cache to use this Cache implementation adjust the cache.cacheName.class setting in the BankframeResource.properties file This cache can only be used to store DataPacket data.
For example to change the txnPersister cache to use this cache implementation use the following setting:cache.txnPersister.class=com.bankframe.services.cache.MergedDataPacketsCache
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
MergedDataPacketsCache()
Default Constructor |
|
MergedDataPacketsCache(CachePolicy policy)
|
|
MergedDataPacketsCache(java.util.Map persistentMap)
|
|
MergedDataPacketsCache(java.util.Map persistentMap,
CachePolicy policy)
|
Method Summary | |
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. |
Methods inherited from class com.bankframe.services.cache.GenericCache |
cleanup, clear, containsKey, containsValue, enableCaching, entrySet, equals, get, getCachePolicy, getFromPersistentMap, getName, getPersistentMap, hashCode, isEmpty, keySet, remove, remove, removeAll, setCachePolicy, setName, setPersistentMap, size, toString, values |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MergedDataPacketsCache()
public MergedDataPacketsCache(CachePolicy policy)
policy
- public MergedDataPacketsCache(java.util.Map persistentMap)
persistentMap
- public MergedDataPacketsCache(java.util.Map persistentMap, CachePolicy policy)
persistentMap
- policy
- Method Detail |
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
GenericCache
put
in interface java.util.Map
put
in class GenericCache
key
- Unique key identifying the objectvalue
- The objectpublic void putAll(java.util.Map values)
GenericCache
putAll
in interface java.util.Map
putAll
in class GenericCache
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |