1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.cache;
18
19 /***
20 * <p>
21 * Provides interface to Jetspeed for cache events
22 * </p>
23 *
24 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
25 * @version $Id: $
26 */
27 public interface JetspeedCacheEventListener
28 {
29
30 /***
31 * REMOVE notification for cache listeners
32 *
33 * @param cache
34 * the Cache repoorting the change
35 * @param local
36 * true if action was local, false if initiated by remote cache
37 * @param key
38 * key of object
39 * @param element
40 * content of object
41 *
42 */
43 void notifyElementRemoved(JetspeedCache cache, boolean local, Object key,
44 Object element);
45
46 /***
47 * ADDED notification for cache listeners
48 *
49 * @param cache
50 * the Cache repoorting the change
51 * @param local
52 * true if action was local, false if initiated by remote cache
53 * @param key
54 * key of object
55 * @param element
56 * content of object
57 *
58 */
59 void notifyElementAdded(JetspeedCache cache, boolean local, Object key,
60 Object element);
61
62 /***
63 * CHANGE notification for cache listeners
64 *
65 * @param cache
66 * the Cache repoorting the change
67 * @param local
68 * true if action was local, false if initiated by remote cache
69 * @param key
70 * key of object
71 * @param element
72 * content of object
73 *
74 */
75 void notifyElementChanged(JetspeedCache cache, boolean local, Object key,
76 Object element);
77
78 /***
79 * EVICTED notification for cache listeners
80 *
81 * @param cache
82 * the Cache repoorting the change
83 * @param local
84 * true if action was local, false if initiated by remote cache
85 * @param key
86 * key of object
87 * @param element
88 * content of object
89 *
90 */
91 void notifyElementEvicted(JetspeedCache cache, boolean local, Object key,
92 Object element);
93
94 /***
95 * EXPIRED notification for cache listeners
96 *
97 * @param cache
98 * the Cache repoorting the change
99 * @param local
100 * true if action was local, false if initiated by remote cache
101 * @param key
102 * key of object
103 * @param element
104 * content of object
105 *
106 */
107 void notifyElementExpired(JetspeedCache cache, boolean local, Object key,
108 Object element);
109
110 }