Package com.ibm.websphere.cache
Class InvalidationEvent
java.lang.Object
java.util.EventObject
com.ibm.websphere.cache.InvalidationEvent
- All Implemented Interfaces:
- Serializable
An event object that provides information about the source of cache-related event.
 InvalidationEvent objects are generated when cache entry is removed from the cache
 based on cache id, dependency id or template. The InvalidationEvent object contains
 six kinds of information:
 
- id - the id that was invalidated
- value - the value that was invalidated
- causeOfInvaliation - the cause of invalidation that generated this event (defined as EXPLICIT, LRU, TIMEOUT or CLEAR_ALL)
- sourceOfInvalidation - the source of invalidation that generated this event (defined as LOCAL or REMOTE)
- cacheName - the name of the cache being used to invalidate.
- timestamp - the timestamp of when this event was generated
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDefine cause of invalidation for CLEAR_ALLstatic final intDefine cause of invalidation for DISK_GARBAGE_COLLECTORstatic final intDefine cause of invalidation for DISK_OVERFLOWstatic final intDefine cause of invalidation for DISK_TIMEOUTstatic final intDefine cause of invalidation for EXPLICITstatic final intDefine cause of invalidation for INACTIVEstatic final intDefine source of invalidation for LOCAL (cache in memory or disk)static final intDefine cause of invalidation for Least Recently Used(LRU)static final intDefine source of invalidation for REMOTEstatic final intDefine cause of invalidation for TIMEOUT
- 
Constructor SummaryConstructorsConstructorDescriptionInvalidationEvent(Object id, Object value, int causeOfInvalidation, int sourceOfInvalidation, String cacheName) Create a new InvalidationEvent from id, cause of invalidation and source of invalidation
- 
Method SummaryModifier and TypeMethodDescriptionGets the name of the cache being used to invalidateintGets the cause of invalidation when this event was generated.getId()Gets the cache id that was invalidated.intGets the source of invalidation when this event was generated.longGets the timestamp of when this event was generated.getValue()Gets the cache value that was invalidated.Methods inherited from class java.util.EventObjectgetSource, toString
- 
Field Details- 
EXPLICITpublic static final int EXPLICITDefine cause of invalidation for EXPLICIT- See Also:
 
- 
LRUpublic static final int LRUDefine cause of invalidation for Least Recently Used(LRU)- See Also:
 
- 
TIMEOUTpublic static final int TIMEOUTDefine cause of invalidation for TIMEOUT- See Also:
 
- 
DISK_TIMEOUTpublic static final int DISK_TIMEOUTDefine cause of invalidation for DISK_TIMEOUT- See Also:
 
- 
CLEAR_ALLpublic static final int CLEAR_ALLDefine cause of invalidation for CLEAR_ALL- See Also:
 
- 
INACTIVEpublic static final int INACTIVEDefine cause of invalidation for INACTIVE- See Also:
 
- 
DISK_GARBAGE_COLLECTORpublic static final int DISK_GARBAGE_COLLECTORDefine cause of invalidation for DISK_GARBAGE_COLLECTOR- See Also:
 
- 
DISK_OVERFLOWpublic static final int DISK_OVERFLOWDefine cause of invalidation for DISK_OVERFLOW- See Also:
 
- 
LOCALpublic static final int LOCALDefine source of invalidation for LOCAL (cache in memory or disk)- See Also:
 
- 
REMOTEpublic static final int REMOTEDefine source of invalidation for REMOTE- See Also:
 
- 
m_cacheName
 
- 
- 
Constructor Details
- 
Method Details- 
getIdGets the cache id that was invalidated. Asterisk is defined for all cache Ids.- Returns:
- the cache id that was invalidated.
 
- 
getValueGets the cache value that was invalidated. If cache id is asterisk, the value will be returned as NULL. The value might be serialized in a byte array format. In this case, you must deserialize the returned value.- Returns:
- the cache value that was invalidated.
 
- 
getCauseOfInvalidationpublic int getCauseOfInvalidation()Gets the cause of invalidation when this event was generated. Use defined constants: EXPLICIT, LRU, TIMEOUT, DISK_TIMEOUT and CLEAR_ALL- Returns:
- the cause of invalidation
 
- 
getSourceOfInvalidationpublic int getSourceOfInvalidation()Gets the source of invalidation when this event was generated. Use defined constants: LOCAL and REMOTE- Returns:
- the cause of invalidation
 
- 
getCacheNameGets the name of the cache being used to invalidate- Returns:
- the name of cache
 
- 
getTimeStamppublic long getTimeStamp()Gets the timestamp of when this event was generated.- Returns:
- the timestamp
 
 
-