oracle.ias.cache
Class CacheEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--oracle.ias.cache.CacheEvent
All Implemented Interfaces:
java.io.Serializable

public class CacheEvent
extends java.util.EventObject

CacheEvent represents an internal cache event. It extends java.util.EventObject. If an event happens on a cached object, the source object in CacheEvent is the cached object which relates to the event that just happened. If an event happens on a cache group, the source object in CacheEvent is the group name which relates to the event that just happened. Event id is used to identify different types of events. Application can register a CacheEventListener to handle event. Currently, only the OBJECT_INVALIDATED and OBJECT_UPDATED events are defined.

Since:
2.0.0
See Also:
Serialized Form

Field Summary
TypeField
static int OBJECT_INVALIDATED
          Represents the object or group invalidated event.
static int OBJECT_UPDATED
          Represents the object updated event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TypeConstructor
protected CacheEvent(int id, java.lang.Object name, java.lang.Object src, CacheEventListener ltn)
          Creates a new CacheEvent.
 
Method Summary
TypeMethod
 int getId()
          getId returns the event identifier.
 java.lang.Object getName()
          getName returns the name of the object associated with the event
 
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

OBJECT_INVALIDATED

public static final int OBJECT_INVALIDATED
Represents the object or group invalidated event. This event can happen in the following scenarioes:
  • application explicitly invalidates the object or the group.
  • time to live expires
  • idle time expires

  • OBJECT_UPDATED

    public static final int OBJECT_UPDATED
    Represents the object updated event. This event can happen when a cached object gets updated. This event usally triggered by a CacheAccess.replace call.
    Constructor Detail

    CacheEvent

    protected CacheEvent(int id,
                         java.lang.Object name,
                         java.lang.Object src,
                         CacheEventListener ltn)
    Creates a new CacheEvent.
    Parameters:
    src - is the source object. If the event happens on a cached object, the cached object is the source object. If the event happens on a cache group, the group name is the source object.
    id - is the event identifier. Currently, only OBJECT_INVALIDATED and OBJECT_UPDATED are supported
    Since:
    2.0.0
    Method Detail

    getId

    public int getId()
    getId returns the event identifier.

    Returns:
    event identifier.
    Since:
    2.0.0

    getName

    public java.lang.Object getName()
    getName returns the name of the object associated with the event

    Returns:
    object name
    Since:
    2.1.0