public class RecloseableGate
extends java.lang.Object
| Constructor and Description |
|---|
RecloseableGate() |
RecloseableGate(boolean isOpen) |
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Waits for the gate to open.
|
boolean |
await(long time,
java.util.concurrent.TimeUnit unit)
Waits for the gate to open or the specified time to elapse.
|
void |
awaitTimingOut(long time,
java.util.concurrent.TimeUnit unit)
Same as
await() but throws a TimeoutException if the
gate was not opened in time. |
void |
awaitUniterruptibly() |
void |
close() |
boolean |
isOpen() |
void |
open() |
public RecloseableGate()
public RecloseableGate(boolean isOpen)
public void open()
public void close()
public boolean isOpen()
public void await()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean await(long time,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void awaitTimingOut(long time,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
await() but throws a TimeoutException if the
gate was not opened in time.java.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionpublic void awaitUniterruptibly()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.