com.ibm.websphere.cache

Class InvalidationEvent

  1. java.lang.Object
  2. extended byjava.util.EventObject
  3. extended bycom.ibm.websphere.cache.InvalidationEvent
All implemented interfaces:
java.io.Serializable

  1. public class InvalidationEvent
  2. extends java.util.EventObject
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:
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
CLEAR_ALL
Define cause of invalidation for CLEAR_ALL
  1. static
  2. int
DISK_GARBAGE_COLLECTOR
Define cause of invalidation for DISK_GARBAGE_COLLECTOR
  1. static
  2. int
DISK_OVERFLOW
Define cause of invalidation for DISK_OVERFLOW
  1. static
  2. int
DISK_TIMEOUT
Define cause of invalidation for DISK_TIMEOUT
  1. static
  2. int
EXPLICIT
Define cause of invalidation for EXPLICIT
  1. static
  2. int
INACTIVE
Define cause of invalidation for INACTIVE
  1. static
  2. int
LOCAL
Define source of invalidation for LOCAL (cache in memory or disk)
  1. static
  2. int
LRU
Define cause of invalidation for Least Recently Used(LRU)
  1. java.lang.String
m_cacheName
  1. static
  2. int
REMOTE
Define source of invalidation for REMOTE
  1. static
  2. int
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
  1. java.lang.String
getCacheName()
Gets the name of the cache being used to invalidate
  1. int
getCauseOfInvalidation()
Gets the cause of invalidation when this event was generated.
  1. java.lang.Object
getId()
Gets the cache id that was invalidated.
  1. int
getSourceOfInvalidation()
Gets the source of invalidation when this event was generated.
  1. long
getTimeStamp()
Gets the timestamp of when this event was generated.
  1. java.lang.Object
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

  1. public static final int EXPLICIT
Define cause of invalidation for EXPLICIT
See Also:

LRU

  1. public static final int LRU
Define cause of invalidation for Least Recently Used(LRU)
See Also:

TIMEOUT

  1. public static final int TIMEOUT
Define cause of invalidation for TIMEOUT
See Also:

DISK_TIMEOUT

  1. public static final int DISK_TIMEOUT
Define cause of invalidation for DISK_TIMEOUT
See Also:

CLEAR_ALL

  1. public static final int CLEAR_ALL
Define cause of invalidation for CLEAR_ALL
See Also:

INACTIVE

  1. public static final int INACTIVE
Define cause of invalidation for INACTIVE
See Also:

DISK_GARBAGE_COLLECTOR

  1. public static final int DISK_GARBAGE_COLLECTOR
Define cause of invalidation for DISK_GARBAGE_COLLECTOR
See Also:

DISK_OVERFLOW

  1. public static final int DISK_OVERFLOW
Define cause of invalidation for DISK_OVERFLOW
See Also:

LOCAL

  1. public static final int LOCAL
Define source of invalidation for LOCAL (cache in memory or disk)
See Also:

REMOTE

  1. public static final int REMOTE
Define source of invalidation for REMOTE
See Also:

m_cacheName

  1. public java.lang.String m_cacheName

Constructor Detail

InvalidationEvent

  1. public InvalidationEvent(java.lang.Object id,
  2. java.lang.Object value,
  3. int causeOfInvalidation,
  4. int sourceOfInvalidation,
  5. java.lang.String cacheName)
Create a new InvalidationEvent from id, cause of invalidation and source of invalidation

Method Detail

getId

  1. 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

  1. 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

  1. 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

  1. 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

  1. public java.lang.String getCacheName( )
Gets the name of the cache being used to invalidate
Returns:
the name of cache

getTimeStamp

  1. public long getTimeStamp()
Gets the timestamp of when this event was generated.
Returns:
the timestamp