01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.oscache.base.events;
06:
07: /**
08: * This is the interface to listen to cache entry events. There is a method
09: * for each event type. These methods are called via a dispatcher. If you
10: * want to be notified when an event occurs on an entry, group or across a
11: * pattern, register a listener and implement this interface.
12: *
13: * @version $Revision: 254 $
14: * @author <a href="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a>
15: */
16: public interface CacheEntryEventListener extends CacheEventListener {
17: /**
18: * Event fired when an entry is added to the cache.
19: */
20: void cacheEntryAdded(CacheEntryEvent event);
21:
22: /**
23: * Event fired when an entry is flushed from the cache.
24: */
25: void cacheEntryFlushed(CacheEntryEvent event);
26:
27: /**
28: * Event fired when an entry is removed from the cache.
29: */
30: void cacheEntryRemoved(CacheEntryEvent event);
31:
32: /**
33: * Event fired when an entry is updated in the cache.
34: */
35: void cacheEntryUpdated(CacheEntryEvent event);
36:
37: /**
38: * Event fired when a group is flushed from the cache.
39: */
40: void cacheGroupFlushed(CacheGroupEvent event);
41:
42: /**
43: * Event fired when a key pattern is flushed from the cache.
44: * Note that this event will <em>not</em> be fired if the pattern
45: * is <code>null</code> or an empty string, instead the flush
46: * request will silently be ignored.
47: */
48: void cachePatternFlushed(CachePatternEvent event);
49:
50: /**
51: * An event that is fired when an entire cache gets flushed.
52: */
53: void cacheFlushed(CachewideEvent event);
54: }
|