com.opensymphony.oscache.base.events
Class CachewideEvent

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

public final class CachewideEvent
extends CacheEvent

A CachewideEvent represents and event that occurs on the the entire cache, eg a cache flush or clear.

Version:
$Revision: 254 $
Author:
Chris Miller

Field Summary
private  Cache cache
          The cache where the event occurred.
private  Date date
          The date/time for when the flush is scheduled
 
Fields inherited from class com.opensymphony.oscache.base.events.CacheEvent
origin
 
Constructor Summary
CachewideEvent(Cache cache, Date date, String origin)
          Constructs a cachewide event with the specified origin.
 
Method Summary
 Cache getCache()
          Retrieve the cache map that the event occurred on.
 Date getDate()
          Retrieve the date/time that the cache flush is scheduled for.
 
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, toString, wait, wait, wait
 

Field Detail

cache

private Cache cache
The cache where the event occurred.


date

private Date date
The date/time for when the flush is scheduled

Constructor Detail

CachewideEvent

public CachewideEvent(Cache cache,
                      Date date,
                      String origin)
Constructs a cachewide event with the specified origin.

Parameters:
cache - The cache map that the event occurred on.
date - The date/time that this cachewide event is scheduled for (eg, the date that the cache is to be flushed).
origin - An optional tag that can be attached to the event to specify the event's origin. This is useful to prevent events from being fired recursively in some situations, such as when an event handler causes another event to be fired.
Method Detail

getCache

public Cache getCache()
Retrieve the cache map that the event occurred on.


getDate

public Date getDate()
Retrieve the date/time that the cache flush is scheduled for.



Copyright © 2011 OpenSymphony. All Rights Reserved.