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.EventObject
- 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 Summary
Modifier and Type | Field and Description |
---|---|
|
CLEAR_ALL
Define cause of invalidation for CLEAR_ALL
|
|
DISK_GARBAGE_COLLECTOR
Define cause of invalidation for DISK_GARBAGE_COLLECTOR
|
|
DISK_OVERFLOW
Define cause of invalidation for DISK_OVERFLOW
|
|
DISK_TIMEOUT
Define cause of invalidation for DISK_TIMEOUT
|
|
EXPLICIT
Define cause of invalidation for EXPLICIT
|
|
INACTIVE
Define cause of invalidation for INACTIVE
|
|
LOCAL
Define source of invalidation for LOCAL (cache in memory or disk)
|
|
LRU
Define cause of invalidation for Least Recently Used(LRU)
|
|
m_cacheName
|
|
REMOTE
Define source of invalidation for REMOTE
|
|
TIMEOUT
Define cause of invalidation for TIMEOUT
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary
Constructor and 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 Summary
Modifier and Type | Method and Description |
---|---|
|
getCacheName()
Gets the name of the cache being used to invalidate
|
|
getCauseOfInvalidation()
Gets the cause of invalidation when this event was generated.
|
|
getId()
Gets the cache id that was invalidated.
|
|
getSourceOfInvalidation()
Gets the source of invalidation when this event was generated.
|
|
getTimeStamp()
Gets the timestamp of when this event was generated.
|
|
getValue()
Gets the cache value that was invalidated.
|
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
EXPLICIT
- public static final int EXPLICIT
Define cause of invalidation for EXPLICIT
See Also:
LRU
- public static final int LRU
Define cause of invalidation for Least Recently Used(LRU)
See Also:
TIMEOUT
- public static final int TIMEOUT
Define cause of invalidation for TIMEOUT
See Also:
DISK_TIMEOUT
- public static final int DISK_TIMEOUT
Define cause of invalidation for DISK_TIMEOUT
See Also:
CLEAR_ALL
- public static final int CLEAR_ALL
Define cause of invalidation for CLEAR_ALL
See Also:
INACTIVE
- public static final int INACTIVE
Define cause of invalidation for INACTIVE
See Also:
DISK_GARBAGE_COLLECTOR
- public static final int DISK_GARBAGE_COLLECTOR
Define cause of invalidation for DISK_GARBAGE_COLLECTOR
See Also:
DISK_OVERFLOW
- public static final int DISK_OVERFLOW
Define cause of invalidation for DISK_OVERFLOW
See Also:
LOCAL
- public static final int LOCAL
Define source of invalidation for LOCAL (cache in memory or disk)
See Also:
REMOTE
- public static final int REMOTE
Define source of invalidation for REMOTE
See Also:
m_cacheName
- public java.lang.String m_cacheName
Constructor Detail
InvalidationEvent
- public 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 Detail
getId
- public 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.
getValue
- public 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.
getCauseOfInvalidation
- public 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
getSourceOfInvalidation
- public int getSourceOfInvalidation( )
Gets the source of invalidation when this event was generated.
Use defined constants: LOCAL and REMOTE
Returns:
the cause of invalidation
getCacheName
- public java.lang.String getCacheName( )
Gets the name of the cache being used to invalidate
Returns:
the name of cache
getTimeStamp
- public long getTimeStamp()
Gets the timestamp of when this event was generated.
Returns:
the timestamp