com.opensymphony.oscache.base.events
Class CacheEntryEvent

java.lang.Object
  extended by com.opensymphony.oscache.base.events.CacheEvent
      extended by com.opensymphony.oscache.base.events.CacheEntryEvent

public final class CacheEntryEvent
extends CacheEvent

CacheEntryEvent is the object created when an event occurs on a cache entry (Add, update, remove, flush). It contains the entry itself and its map.

Version:
$Revision: 1.1 $
Author:
Francois Beauregard

Field Summary
 
Fields inherited from class com.opensymphony.oscache.base.events.CacheEvent
origin
 
Constructor Summary
CacheEntryEvent(Cache map, CacheEntry entry)
          Constructs a cache entry event object with no specified origin
CacheEntryEvent(Cache map, CacheEntry entry, String origin)
          Constructs a cache entry event object
 
Method Summary
 CacheEntry getEntry()
          Retrieve the cache entry that the event applies to.
 String getKey()
          Retrieve the cache entry key
 Cache getMap()
          Retrieve the cache map where the entry resides.
 String toString()
           
 
Methods inherited from class com.opensymphony.oscache.base.events.CacheEvent
getOrigin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheEntryEvent

public CacheEntryEvent(Cache map,
                       CacheEntry entry)
Constructs a cache entry event object with no specified origin

Parameters:
map - The cache map of the cache entry
entry - The cache entry that the event applies to

CacheEntryEvent

public CacheEntryEvent(Cache map,
                       CacheEntry entry,
                       String origin)
Constructs a cache entry event object

Parameters:
map - The cache map of the cache entry
entry - The cache entry that the event applies to
origin - The origin of this event
Method Detail

getEntry

public CacheEntry getEntry()
Retrieve the cache entry that the event applies to.


getKey

public String getKey()
Retrieve the cache entry key


getMap

public Cache getMap()
Retrieve the cache map where the entry resides.


toString

public String toString()
Overrides:
toString in class Object

OSCache Project Page