AbstractQueuedLongSynchronizer (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
void
[acquire](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#acquire-long-)(long arg)
Acquires in exclusive mode, ignoring interrupts.
void
[acquireInterruptibly](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#acquireInterruptibly-long-)(long arg)
Acquires in exclusive mode, aborting if interrupted.
void
[acquireShared](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#acquireShared-long-)(long arg)
Acquires in shared mode, ignoring interrupts.
void
[acquireSharedInterruptibly](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#acquireSharedInterruptibly-long-)(long arg)
Acquires in shared mode, aborting if interrupted.
protected boolean
[compareAndSetState](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#compareAndSetState-long-long-)(long expect, long update)
Atomically sets synchronization state to the given updated value if the current state value equals the expected value.
[Collection](../../../../java/util/Collection.html "interface in java.util")<[Thread](../../../../java/lang/Thread.html "class in java.lang")>
[getExclusiveQueuedThreads](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getExclusiveQueuedThreads--)()
Returns a collection containing threads that may be waiting to acquire in exclusive mode.
[Thread](../../../../java/lang/Thread.html "class in java.lang")
[getFirstQueuedThread](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getFirstQueuedThread--)()
Returns the first (longest-waiting) thread in the queue, ornull
if no threads are currently queued.
[Collection](../../../../java/util/Collection.html "interface in java.util")<[Thread](../../../../java/lang/Thread.html "class in java.lang")>
[getQueuedThreads](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getQueuedThreads--)()
Returns a collection containing threads that may be waiting to acquire.
int
[getQueueLength](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getQueueLength--)()
Returns an estimate of the number of threads waiting to acquire.
[Collection](../../../../java/util/Collection.html "interface in java.util")<[Thread](../../../../java/lang/Thread.html "class in java.lang")>
[getSharedQueuedThreads](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getSharedQueuedThreads--)()
Returns a collection containing threads that may be waiting to acquire in shared mode.
protected long
[getState](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getState--)()
Returns the current value of synchronization state.
[Collection](../../../../java/util/Collection.html "interface in java.util")<[Thread](../../../../java/lang/Thread.html "class in java.lang")>
[getWaitingThreads](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getWaitingThreads-java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject-)([AbstractQueuedLongSynchronizer.ConditionObject](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.ConditionObject.html "class in java.util.concurrent.locks") condition)
Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.
int
[getWaitQueueLength](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#getWaitQueueLength-java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject-)([AbstractQueuedLongSynchronizer.ConditionObject](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.ConditionObject.html "class in java.util.concurrent.locks") condition)
Returns an estimate of the number of threads waiting on the given condition associated with this synchronizer.
boolean
[hasContended](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#hasContended--)()
Queries whether any threads have ever contended to acquire this synchronizer; that is if an acquire method has ever blocked.
boolean
[hasQueuedPredecessors](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#hasQueuedPredecessors--)()
Queries whether any threads have been waiting to acquire longer than the current thread.
boolean
[hasQueuedThreads](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#hasQueuedThreads--)()
Queries whether any threads are waiting to acquire.
boolean
[hasWaiters](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#hasWaiters-java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject-)([AbstractQueuedLongSynchronizer.ConditionObject](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.ConditionObject.html "class in java.util.concurrent.locks") condition)
Queries whether any threads are waiting on the given condition associated with this synchronizer.
protected boolean
[isHeldExclusively](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#isHeldExclusively--)()
Returns true
if synchronization is held exclusively with respect to the current (calling) thread.
boolean
[isQueued](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#isQueued-java.lang.Thread-)([Thread](../../../../java/lang/Thread.html "class in java.lang") thread)
Returns true if the given thread is currently queued.
boolean
[owns](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#owns-java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject-)([AbstractQueuedLongSynchronizer.ConditionObject](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.ConditionObject.html "class in java.util.concurrent.locks") condition)
Queries whether the given ConditionObject uses this synchronizer as its lock.
boolean
[release](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#release-long-)(long arg)
Releases in exclusive mode.
boolean
[releaseShared](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#releaseShared-long-)(long arg)
Releases in shared mode.
protected void
[setState](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#setState-long-)(long newState)
Sets the value of synchronization state.
[String](../../../../java/lang/String.html "class in java.lang")
[toString](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#toString--)()
Returns a string identifying this synchronizer, as well as its state.
protected boolean
[tryAcquire](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryAcquire-long-)(long arg)
Attempts to acquire in exclusive mode.
boolean
[tryAcquireNanos](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryAcquireNanos-long-long-)(long arg, long nanosTimeout)
Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.
protected long
[tryAcquireShared](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryAcquireShared-long-)(long arg)
Attempts to acquire in shared mode.
boolean
[tryAcquireSharedNanos](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryAcquireSharedNanos-long-long-)(long arg, long nanosTimeout)
Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.
protected boolean
[tryRelease](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryRelease-long-)(long arg)
Attempts to set the state to reflect a release in exclusive mode.
protected boolean
[tryReleaseShared](../../../../java/util/concurrent/locks/AbstractQueuedLongSynchronizer.html#tryReleaseShared-long-)(long arg)
Attempts to set the state to reflect a release in shared mode.