|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
com.tangosol.util.MapEvent
com.tangosol.net.cache.CacheEvent
public class CacheEvent
An extension of the MapEvent which allows to differentiate between client driven (natural) events and cache internal (synthetic) events.
Consider a client code calling a remove() method for a cache. Quite naturally it causes a corresponding ENTRY_DELETED event. However, the same event could be as well caused by the client code calling put() forcing an entry eviction. Alternatively, the put() method called by a client code naturally causes either ENTRY_INSERTED or ENTRY_UPDATED event. However, the same event could be as well caused by a client call to a get() method that in turn forces an entry insertion by a cache loader.
Field Summary | |
---|---|
protected boolean |
m_fSynthetic
Event cause flag. |
Fields inherited from class com.tangosol.util.MapEvent |
---|
ENTRY_DELETED, ENTRY_INSERTED, ENTRY_UPDATED, m_nId, m_oKey, m_oValueNew, m_oValueOld |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
CacheEvent(ObservableMap map,
int nId,
Object oKey,
Object oValueOld,
Object oValueNew,
boolean fSynthetic)
Constructs a new CacheEvent. |
Method Summary | |
---|---|
protected String |
getDescription()
Get the event's description. |
boolean |
isSynthetic()
Return true iff this event is caused by the cache internal processing such as eviction or loading |
Methods inherited from class com.tangosol.util.MapEvent |
---|
dispatch, dispatch, dispatch, getDescription, getId, getKey, getMap, getNewValue, getOldValue, toString |
Methods inherited from class java.util.EventObject |
---|
getSource |
Field Detail |
---|
protected boolean m_fSynthetic
Constructor Detail |
---|
public CacheEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic)
map
- the ObservableMap object that fired the eventnId
- this event's id, one of MapEvent.ENTRY_INSERTED
,
MapEvent.ENTRY_UPDATED
or MapEvent.ENTRY_DELETED
oKey
- the key into the mapoValueOld
- the old value (for update and delete events)oValueNew
- the new value (for insert and update events)fSynthetic
- true iff the event is caused by the cache
internal processing such as eviction or loadingMethod Detail |
---|
public boolean isSynthetic()
protected String getDescription()
getDescription
in class MapEvent
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |