public class OneShotGate
extends java.lang.Object
| Constructor and Description |
|---|
OneShotGate() |
| Modifier and Type | Method and Description |
|---|---|
long |
await()
All threads entering this method are blocked until the gate is opened.
|
void |
await(long millis)
Waits at longest for the given millis without throwing a
TimeoutException. |
long |
awaitNonInterruptible()
Lets the calling thread wait on the gate in a non interruptible mode
|
long |
awaitTimingOut(long millis)
Waits at longest for the given millis and throws a
TimeoutException if
the expected wait time was exceeded. |
boolean |
isOpen()
Tells whether the gate has been opened.
|
void |
open()
Opens the gate forever.
|
public void open()
public boolean isOpen()
public long await()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic long awaitNonInterruptible()
public void await(long millis)
throws java.lang.InterruptedException
TimeoutException.java.lang.InterruptedExceptionpublic long awaitTimingOut(long millis)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
TimeoutException if
the expected wait time was exceeded.InterruptedException, - TimeoutExceptionjava.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionCopyright © 2012 EsprIT-Systems. All Rights Reserved.