org.hsqldb.test
Class Waiter
- java.lang.Object
-
- org.hsqldb.test.Waiter
-
public class Waiter extends java.lang.ObjectSingle-use synchronization object. Design would be more scalable if there were a separate collection class, instead of the static Waiter.map. The limitation is acceptable since there's no use case for running multiple Test Runners simultaneously from a single JVM (one Test runner can handle multiple test scripts simultaneously or synchronously). (It would be much work to make the collection non-static, because that would require a refactor of TestUtil with proper OOD).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static WaitergetWaiter(java.lang.String key)It doesn't matter if the waiter or the waitee runs getWaiter() first.booleanisNotified()booleanisWaiting()voidresume(boolean enforceSequence)voidwaitFor(boolean enforceSequence)
-
-
-
Method Detail
-
isNotified
public boolean isNotified()
-
isWaiting
public boolean isWaiting()
-
waitFor
public void waitFor(boolean enforceSequence)
- Parameters:
enforceSequence- Fail if waitFor() called before resume()
-
resume
public void resume(boolean enforceSequence)
- Parameters:
enforceSequence- Fail if waitFor() called before resume()
-
getWaiter
public static Waiter getWaiter(java.lang.String key)
It doesn't matter if the waiter or the waitee runs getWaiter() first. Whoever requests it first will instantiate it.- Returns:
- A Waiter instance. Never returns nul.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG