|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A cache listener may be registered with a Cache to listen for various events.
Method Summary | |
void |
onClear()
Triggered when cache is cleared due to Cache.clear() |
void |
onCreate(java.util.Map addedMap)
Triggered when a cache mappings is created due to Cache.put(). |
void |
onEvict(java.util.Map evictedMap)
Triggered when cache keys are evicted |
void |
onLoad(java.util.Map loadedMap)
Triggered when cache mappings are created due to the cache loader being consulted |
void |
onLoadError(java.util.Collection keys,
java.lang.Throwable error)
This method is invoked when there is an error in loading certain keys |
void |
onRemove(java.util.Map removedMap)
Triggered when a cache mapping is removed due to Cache.remove() |
void |
onStore(java.util.Map storedMap)
Triggered when cache keys are stored in the backing store. |
void |
onStoreError(java.util.Map storedMap,
java.lang.Throwable problem)
This method gets invoked when the cache is unable to write some of the key-value pairs to the backing store |
void |
onUpdate(java.util.Map updatedMap)
Triggered when some cache mappings are updated due to Cache.put() |
Method Detail |
public void onLoad(java.util.Map loadedMap)
loadedMap
- A map of keys and values loaded by the cache loaderpublic void onLoadError(java.util.Collection keys, java.lang.Throwable error)
keys
- A collection of keys that were being loaded
when the problem occoured.error
- the error reported in loading the entriespublic void onStore(java.util.Map storedMap)
storedMap
- A map of keys and values stored by the cache storepublic void onStoreError(java.util.Map storedMap, java.lang.Throwable problem)
storedMap
- public void onCreate(java.util.Map addedMap)
addedMap
- A map of single key-value pair created due to put operationpublic void onUpdate(java.util.Map updatedMap)
updatedMap
- A map of single key-value pair. The value is the updated
one.public void onEvict(java.util.Map evictedMap)
evictedMap
- A map of key and values evicted from the cachepublic void onRemove(java.util.Map removedMap)
removedMap
- A map of a single key-value pair removed by the remove
operationpublic void onClear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |