KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > TreeCacheListener


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  * Created on March 25 2003
7  */

8 package org.jboss.cache;
9
10
11 import org.jgroups.View;
12
13 /**
14  * Callbacks for various events regarding TreeCache. Implementers should avoid performing long running actions,
15  * as this blocks the cache. If you have to do so, please start a new thread.
16  * @author Bela Ban
17  * @author Ben Wang
18  * @version $Revision: 1.12 $
19  */

20 public interface TreeCacheListener {
21    /**
22     * Called when a node is created
23     * @param fqn
24     */

25    void nodeCreated(Fqn fqn);
26
27    /**
28     * Called when a node is removed.
29     * @param fqn
30     */

31    void nodeRemoved(Fqn fqn);
32
33    /**
34     * Called when a node is loaded into memory via the CacheLoader. This is not the same
35     * as {@link #nodeCreated(Fqn)}.
36     */

37    void nodeLoaded(Fqn fqn);
38
39
40    /**
41     * Called when a node is evicted (not the same as remove()).
42     * @param fqn
43     */

44    void nodeEvicted(Fqn fqn);
45
46    /**
47     * Called when a node is modified, e.g., one (key, value) pair
48     * in the internal map storage has been modified.
49     * @param fqn
50     */

51    void nodeModified(Fqn fqn);
52
53    /**
54     * Called when a node is visisted, i.e., get().
55     * @param fqn
56     */

57    void nodeVisited(Fqn fqn);
58
59    /**
60     * Called when the cache is started.
61     * @param cache
62     */

63    void cacheStarted(TreeCache cache);
64
65    /**
66     * Called when the cache is stopped.
67     * @param cache
68     */

69    void cacheStopped(TreeCache cache);
70
71    void viewChange(View new_view); // might be MergeView after merging
72
}
73
Popular Tags