This content has been marked as final.
Show 4 replies
-
1. Re: Accessing Underlying JGroup Information
rino_salvade Nov 14, 2005 4:40 PM (in response to greenbean)You can register a TreeCacheListener to your cache. Whenever a member joins or leaves the group the viewChange method gets called with a list of the current members.
-
2. Re: Accessing Underlying JGroup Information
belaban Nov 14, 2005 4:47 PM (in response to greenbean)Implement a TreeCacheListener, the callback is viewAccepted(View)
-
3. Re: Accessing Underlying JGroup Information
greenbean Nov 14, 2005 5:51 PM (in response to greenbean)This is great. I have been looking around but don't see an example of how to connect a TreeCacheListener to a cache instance. Where can I find an example of this?
I am assuming it can be done in xml configuration files.
Thanks again,
Greenbean -
4. Re: Accessing Underlying JGroup Information
rino_salvade Nov 15, 2005 12:41 AM (in response to greenbean)I do not know about the XML configuration. Codewise it is just
public class TestTreeCacheListener implements TreeCacheListener { public TestTreeCacheListener() { super(); } public void viewChange(View inView) { // Do your stuff } } cache.addTreeCacheListener(new TestTreeCacheListener())
Code above is not compiling, just to get the idea.