com.atlassian.beehive
Class Barrier
java.lang.Object
com.atlassian.beehive.Barrier
public class Barrier
- extends Object
A simple one-shot event barrier that can last at most the requested number of seconds.
Threads that await() the event will blocked until its signal() is called.
An AssertionError is thrown if:
signal() is called multiple times
- a thread is held in
await(long) for longer than the timeout (default 5 seconds)
- a thread is interrupted while
waiting
- Since:
- v0.0.8
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT
- The default timeout that will be used by
await().
- See Also:
- Constant Field Values
Barrier
public Barrier()
signal
public void signal()
await
public void await()
await
public void await(long timeout)
Copyright © 2014 Atlassian. All Rights Reserved.