KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > test > core > tree > Helper


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.test.core.tree;
10
11 import org.jboss.portal.core.impl.tree.AbstractJBossCacheListener;
12 import org.jgroups.View;
13
14 /**
15  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
16  * @version $Revision: 1.1 $
17  */

18 public class Helper extends AbstractJBossCacheListener
19 {
20
21    public synchronized void waitUntil() throws InterruptedException JavaDoc
22    {
23       while (view == null || view.size() < 1)
24       {
25          wait();
26       }
27    }
28
29    public synchronized void viewChange(View view)
30    {
31       super.viewChange(view);
32       notifyAll();
33    }
34
35 }
36
Popular Tags