com.atlassian.beehive
Class Barrier

java.lang.Object
  extended by 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:

Since:
v0.0.8

Field Summary
static long DEFAULT_TIMEOUT
          The default timeout that will be used by await().
 
Constructor Summary
Barrier()
           
 
Method Summary
 void await()
           
 void await(long timeout)
           
 void signal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
The default timeout that will be used by await().

See Also:
Constant Field Values
Constructor Detail

Barrier

public Barrier()
Method Detail

signal

public void signal()

await

public void await()

await

public void await(long timeout)


Copyright © 2014 Atlassian. All Rights Reserved.