Deprecated
(4.2) do not use
This class implements throw away objects. It is instantiated whenever a thread needs to wait. Instances are not re-used, except if the waiting thread experiences a spurious wake up and continues to wait.
All methods assume external synchronization on the condition passed to the constructor. Instances of this class do not synchronize access!
| Modifier and Type | Field and Description |
|---|---|
| private boolean | aborted
True if this was interrupted. |
| private final Condition | cond
The condition on which the thread is waiting. |
| private final RouteSpecificPool | pool
The route specific pool on which the thread is waiting. |
| private Thread | waiter
The thread that is waiting for an entry. |
| Access | Constructor and Description |
|---|---|
| public | WaitingThread(final Condition
the condition for which to wait cond, final RouteSpecificPool the pool on which the thread will be waiting,
or pool)null
Deprecated
as a consequence of
Creates a new entry for a waiting thread.
RouteSpecificPool being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the condition was satisfied,
false in case of a timeout.
Typically, a call to wakeup is used to indicate
that the condition was satisfied. Since the condition is
accessible outside, this cannot be guaranteed though.when to time out, or deadline)null for no timeoutBlocks the calling thread. |
| public final Condition | |
| public final RouteSpecificPool | Returns: the pool on which a thread is or was waiting, ornull
Deprecated
as a consequence of
Obtains the pool, if there is one.
RouteSpecificPool being deprecated.
|
| public final Thread | |
| public void | |
| public void |
| aborted | back to summary |
|---|---|
| private boolean aborted True if this was interrupted. | |
| cond | back to summary |
|---|---|
| private final Condition cond The condition on which the thread is waiting. | |
| pool | back to summary |
|---|---|
| private final RouteSpecificPool pool
Deprecated as a consequence of The route specific pool on which the thread is waiting. | |
| waiter | back to summary |
|---|---|
| private Thread waiter The thread that is waiting for an entry. | |
| WaitingThread | back to summary |
|---|---|
| public WaitingThread(final Condition cond, final RouteSpecificPool pool)
Deprecated as a consequence of Creates a new entry for a waiting thread.
| |
| await | back to summary |
|---|---|
| public boolean await(final Date deadline) throws InterruptedException Blocks the calling thread. This method returns when the thread is notified or interrupted, if a timeout occurrs, or if there is a spurious wakeup. This method assumes external synchronization.
| |
| getCondition | back to summary |
|---|---|
| public final Condition getCondition() Obtains the condition.
| |
| getPool | back to summary |
|---|---|
| public final RouteSpecificPool getPool()
Deprecated as a consequence of Obtains the pool, if there is one.
| |
| getThread | back to summary |
|---|---|
| public final Thread getThread() Obtains the thread, if there is one.
| |
| interrupt | back to summary |
|---|---|
| public void interrupt() | |
| wakeup | back to summary |
|---|---|
| public void wakeup() Wakes up the waiting thread. This method assumes external synchronization. | |