org.jgroups.util
public class CondVar extends Object
Version: $Id: CondVar.java,v 1.3 2004/12/31 14:10:40 belaban Exp $
Constructor Summary | |
---|---|
CondVar(String name, Object cond) | |
CondVar(String name, Object cond, Object lock) |
Method Summary | |
---|---|
Object | get() |
Object | getLock() |
void | set(Object result) Sets the result |
String | toString() |
void | waitUntil(Object result, long timeout)
Waits until the condition matches the expected result. |
void | waitUntil(Object result) |
void | waitUntilWithTimeout(Object result, long timeout)
Waits until the condition matches the expected result. |
Parameters: result The result, needs to match the condition (using equals()). timeout Number of milliseconds to wait. A value of <= 0 means to wait forever
Parameters: result The result, needs to match the condition (using equals()). timeout Number of milliseconds to wait. A value of <= 0 means to wait forever
Throws: TimeoutException Thrown if the result still doesn't match the condition after timeout milliseconds have elapsed