Class AbstractQueuedSynchronizer.ConditionObject

java.lang.Object
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject
All Implemented Interfaces:
Serializable, Condition
Enclosing class:
AbstractQueuedSynchronizer

public class AbstractQueuedSynchronizer.ConditionObject extends Object implements Condition, Serializable
Condition implementation for a AbstractQueuedSynchronizer 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 AbstractQueuedSynchronizer.

This class is Serializable, but all fields are transient, so deserialized conditions have no waiters.

Since:
1.5
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ConditionObject instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Implements interruptible condition wait.
    final boolean
    await(long time, TimeUnit unit)
    Implements timed condition wait.
    final long
    awaitNanos(long nanosTimeout)
    Implements timed condition wait.
    final void
    Implements uninterruptible condition wait.
    final boolean
    awaitUntil(Date deadline)
    Implements absolute timed condition wait.
    protected final Collection<Thread>
    Returns a collection containing those threads that may be waiting on this Condition.
    protected final int
    Returns an estimate of the number of threads waiting on this condition.
    protected final boolean
    Queries whether any threads are waiting on this condition.
    final void
    Moves the longest-waiting thread, if one exists, from the wait queue for this condition to the wait queue for the owning lock.
    final void
    Moves all threads from the wait queue for this condition to the wait queue for the owning lock.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    Answers a string containing a concise, human-readable description of the receiver.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.