java.lang.Object | |
↳ | java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject |
Condition implementation for a AbstractQueuedLongSynchronizer
serving as the basis of a Lock
implementation.
Method documentation for this class describes mechanics, not behavioral specifications from the point of view of Lock and Condition users. Exported versions of this class will in general need to be accompanied by documentation describing condition semantics that rely on those of the associated AbstractQueuedLongSynchronizer.
This class is Serializable, but all fields are transient, so deserialized conditions have no waiters.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new ConditionObject instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implements interruptible condition wait.
| |||||||||||
Implements timed condition wait.
| |||||||||||
Implements timed condition wait.
| |||||||||||
Implements uninterruptible condition wait.
| |||||||||||
Implements absolute timed condition wait.
| |||||||||||
Moves the longest-waiting thread, if one exists, from the
wait queue for this condition to the wait queue for the
owning lock.
| |||||||||||
Moves all threads from the wait queue for this condition to
the wait queue for the owning lock.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an estimate of the number of threads waiting on
this condition.
| |||||||||||
Returns a collection containing those threads that may be
waiting on this Condition.
| |||||||||||
Queries whether any threads are waiting on this condition.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface java.util.concurrent.locks.Condition
|
Creates a new ConditionObject instance.
Implements interruptible condition wait.
getState()
.
release(long)
with
saved state as argument, throwing
IllegalMonitorStateException if it fails.
acquire(long)
with saved state as argument.
InterruptedException |
---|
Implements timed condition wait.
getState()
.
release(long)
with
saved state as argument, throwing
IllegalMonitorStateException if it fails.
acquire(long)
with saved state as argument.
time | the maximum time to wait |
---|---|
unit | the time unit of the time argument |
false
if the waiting time detectably elapsed
before return from the method, else true
InterruptedException |
---|
Implements timed condition wait.
getState()
.
release(long)
with
saved state as argument, throwing
IllegalMonitorStateException if it fails.
acquire(long)
with saved state as argument.
nanosTimeout | the maximum time to wait, in nanoseconds |
---|
nanosTimeout
value minus
the time spent waiting upon return from this method.
A positive value may be used as the argument to a
subsequent call to this method to finish waiting out
the desired time. A value less than or equal to zero
indicates that no time remains.InterruptedException |
---|
Implements uninterruptible condition wait.
getState()
.
release(long)
with
saved state as argument, throwing
IllegalMonitorStateException if it fails.
acquire(long)
with saved state as argument.
Implements absolute timed condition wait.
getState()
.
release(long)
with
saved state as argument, throwing
IllegalMonitorStateException if it fails.
acquire(long)
with saved state as argument.
deadline | the absolute time to wait until |
---|
false
if the deadline has elapsed upon return, else
true
InterruptedException |
---|
Moves the longest-waiting thread, if one exists, from the wait queue for this condition to the wait queue for the owning lock.
IllegalMonitorStateException | if isHeldExclusively()
returns false
|
---|
Moves all threads from the wait queue for this condition to the wait queue for the owning lock.
IllegalMonitorStateException | if isHeldExclusively()
returns false
|
---|
Returns an estimate of the number of threads waiting on
this condition.
Implements getWaitQueueLength(AbstractQueuedLongSynchronizer.ConditionObject)
.
IllegalMonitorStateException | if isHeldExclusively()
returns false
|
---|
Returns a collection containing those threads that may be
waiting on this Condition.
Implements getWaitingThreads(AbstractQueuedLongSynchronizer.ConditionObject)
.
IllegalMonitorStateException | if isHeldExclusively()
returns false
|
---|
Queries whether any threads are waiting on this condition.
Implements hasWaiters(AbstractQueuedLongSynchronizer.ConditionObject)
.
true
if there are any waiting threadsIllegalMonitorStateException | if isHeldExclusively()
returns false
|
---|