declare namespace java { namespace util { namespace concurrent { namespace locks { namespace AbstractQueuedSynchronizer { /** * Condition implementation for a {@link * AbstractQueuedSynchronizer} serving as the basis of a {@link * 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 * {@code AbstractQueuedSynchronizer}. *

This class is Serializable, but all fields are transient, * so deserialized conditions have no waiters. */ // @ts-ignore class ConditionObject extends java.lang.Object implements java.util.concurrent.locks.Condition, java.io.Serializable { /** * Creates a new {@code ConditionObject} instance. */ // @ts-ignore constructor() /** * Moves the longest-waiting thread, if one exists, from the * wait queue for this condition to the wait queue for the * owning lock. * @throws IllegalMonitorStateException if {#link #isHeldExclusively} * returns {@code false} */ // @ts-ignore public signal(): void /** * Moves all threads from the wait queue for this condition to * the wait queue for the owning lock. * @throws IllegalMonitorStateException if {#link #isHeldExclusively} * returns {@code false} */ // @ts-ignore public signalAll(): void /** * Implements uninterruptible condition wait. *

    *
  1. Save lock state returned by {@link #getState}. *
  2. Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  3. Block until signalled. *
  4. Reacquire by invoking specialized version of * {@link #acquire} with saved state as argument. *
*/ // @ts-ignore public awaitUninterruptibly(): void /** * Implements interruptible condition wait. *
    *
  1. If current thread is interrupted, throw InterruptedException. *
  2. Save lock state returned by {@link #getState}. *
  3. Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  4. Block until signalled or interrupted. *
  5. Reacquire by invoking specialized version of * {@link #acquire} with saved state as argument. *
  6. If interrupted while blocked in step 4, throw InterruptedException. *
*/ // @ts-ignore public await(): void /** * Implements timed condition wait. *
    *
  1. If current thread is interrupted, throw InterruptedException. *
  2. Save lock state returned by {@link #getState}. *
  3. Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  4. Block until signalled, interrupted, or timed out. *
  5. Reacquire by invoking specialized version of * {@link #acquire} with saved state as argument. *
  6. If interrupted while blocked in step 4, throw InterruptedException. *
*/ // @ts-ignore public awaitNanos(nanosTimeout: number /*long*/): number /*long*/ /** * Implements absolute timed condition wait. *
    *
  1. If current thread is interrupted, throw InterruptedException. *
  2. Save lock state returned by {@link #getState}. *
  3. Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  4. Block until signalled, interrupted, or timed out. *
  5. Reacquire by invoking specialized version of * {@link #acquire} with saved state as argument. *
  6. If interrupted while blocked in step 4, throw InterruptedException. *
  7. If timed out while blocked in step 4, return false, else true. *
*/ // @ts-ignore public awaitUntil(deadline: java.util.Date): boolean /** * Implements timed condition wait. *
    *
  1. If current thread is interrupted, throw InterruptedException. *
  2. Save lock state returned by {@link #getState}. *
  3. Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  4. Block until signalled, interrupted, or timed out. *
  5. Reacquire by invoking specialized version of * {@link #acquire} with saved state as argument. *
  6. If interrupted while blocked in step 4, throw InterruptedException. *
  7. If timed out while blocked in step 4, return false, else true. *
*/ // @ts-ignore public await(time: number /*long*/, unit: java.util.concurrent.TimeUnit): boolean /** * Queries whether any threads are waiting on this condition. * Implements {@link AbstractQueuedSynchronizer#hasWaiters(ConditionObject)}. * @return {#code true} if there are any waiting threads * @throws IllegalMonitorStateException if {#link #isHeldExclusively} * returns {@code false} */ // @ts-ignore hasWaiters(): boolean /** * Returns an estimate of the number of threads waiting on * this condition. * Implements {@link AbstractQueuedSynchronizer#getWaitQueueLength(ConditionObject)}. * @return the estimated number of waiting threads * @throws IllegalMonitorStateException if {#link #isHeldExclusively} * returns {@code false} */ // @ts-ignore getWaitQueueLength(): number /*int*/ /** * Returns a collection containing those threads that may be * waiting on this Condition. * Implements {@link AbstractQueuedSynchronizer#getWaitingThreads(ConditionObject)}. * @return the collection of threads * @throws IllegalMonitorStateException if {#link #isHeldExclusively} * returns {@code false} */ // @ts-ignore getWaitingThreads(): Array } } } } } }