Package com.ibm.websphere.cache
Class InvalidationEvent
- java.lang.Object
- 
- java.util.EventObject
- 
- com.ibm.websphere.cache.InvalidationEvent
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class InvalidationEvent extends java.util.EventObjectAn 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:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intCLEAR_ALLDefine cause of invalidation for CLEAR_ALLstatic intDISK_GARBAGE_COLLECTORDefine cause of invalidation for DISK_GARBAGE_COLLECTORstatic intDISK_OVERFLOWDefine cause of invalidation for DISK_OVERFLOWstatic intDISK_TIMEOUTDefine cause of invalidation for DISK_TIMEOUTstatic intEXPLICITDefine cause of invalidation for EXPLICITstatic intINACTIVEDefine cause of invalidation for INACTIVEstatic intLOCALDefine source of invalidation for LOCAL (cache in memory or disk)static intLRUDefine cause of invalidation for Least Recently Used(LRU)java.lang.Stringm_cacheNamestatic intREMOTEDefine source of invalidation for REMOTEstatic intTIMEOUTDefine cause of invalidation for TIMEOUT
 - 
Constructor SummaryConstructors Constructor Description InvalidationEvent(java.lang.Object id, java.lang.Object value, int causeOfInvalidation, int sourceOfInvalidation, java.lang.String cacheName)Create a new InvalidationEvent from id, cause of invalidation and source of invalidation
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCacheName()Gets the name of the cache being used to invalidateintgetCauseOfInvalidation()Gets the cause of invalidation when this event was generated.java.lang.ObjectgetId()Gets the cache id that was invalidated.intgetSourceOfInvalidation()Gets the source of invalidation when this event was generated.longgetTimeStamp()Gets the timestamp of when this event was generated.java.lang.ObjectgetValue()Gets the cache value that was invalidated.
 
- 
- 
- 
Field Detail- 
EXPLICITpublic static final int EXPLICIT Define cause of invalidation for EXPLICIT- See Also:
- Constant Field Values
 
 - 
LRUpublic static final int LRU Define cause of invalidation for Least Recently Used(LRU)- See Also:
- Constant Field Values
 
 - 
TIMEOUTpublic static final int TIMEOUT Define cause of invalidation for TIMEOUT- See Also:
- Constant Field Values
 
 - 
DISK_TIMEOUTpublic static final int DISK_TIMEOUT Define cause of invalidation for DISK_TIMEOUT- See Also:
- Constant Field Values
 
 - 
CLEAR_ALLpublic static final int CLEAR_ALL Define cause of invalidation for CLEAR_ALL- See Also:
- Constant Field Values
 
 - 
INACTIVEpublic static final int INACTIVE Define cause of invalidation for INACTIVE- See Also:
- Constant Field Values
 
 - 
DISK_GARBAGE_COLLECTORpublic static final int DISK_GARBAGE_COLLECTOR Define cause of invalidation for DISK_GARBAGE_COLLECTOR- See Also:
- Constant Field Values
 
 - 
DISK_OVERFLOWpublic static final int DISK_OVERFLOW Define cause of invalidation for DISK_OVERFLOW- See Also:
- Constant Field Values
 
 - 
LOCALpublic static final int LOCAL Define source of invalidation for LOCAL (cache in memory or disk)- See Also:
- Constant Field Values
 
 - 
REMOTEpublic static final int REMOTE Define source of invalidation for REMOTE- See Also:
- Constant Field Values
 
 - 
m_cacheNamepublic java.lang.String m_cacheName 
 
- 
 - 
Method Detail- 
getIdpublic java.lang.Object getId() Gets the cache id that was invalidated. Asterisk is defined for all cache Ids.- Returns:
- the cache id that was invalidated.
 
 - 
getValuepublic java.lang.Object getValue() Gets 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
 
 - 
getCacheNamepublic java.lang.String getCacheName() Gets 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
 
 
- 
 
-