java.util.concurrent.locks
Class AbstractQueuedSynchronizer
java.lang.Object
java.util.concurrent.locks.AbstractQueuedSynchronizer
- All Implemented Interfaces:
- Serializable
public abstract class AbstractQueuedSynchronizer
- extends Object
- implements Serializable
- See Also:
- Serialized Form
AbstractQueuedSynchronizer
protected AbstractQueuedSynchronizer()
getState
protected final int getState()
setState
protected final void setState(int newState)
compareAndSetState
protected final boolean compareAndSetState(int expect,
int update)
tryAcquire
protected boolean tryAcquire(int arg)
tryRelease
protected boolean tryRelease(int arg)
tryAcquireShared
protected int tryAcquireShared(int arg)
tryReleaseShared
protected boolean tryReleaseShared(int arg)
isHeldExclusively
protected boolean isHeldExclusively()
acquire
public final void acquire(int arg)
acquireInterruptibly
public final void acquireInterruptibly(int arg)
throws InterruptedException
- Throws:
InterruptedException
tryAcquireNanos
public final boolean tryAcquireNanos(int arg,
long nanosTimeout)
throws InterruptedException
- Throws:
InterruptedException
release
public final boolean release(int arg)
acquireShared
public final void acquireShared(int arg)
acquireSharedInterruptibly
public final void acquireSharedInterruptibly(int arg)
throws InterruptedException
- Throws:
InterruptedException
tryAcquireSharedNanos
public final boolean tryAcquireSharedNanos(int arg,
long nanosTimeout)
throws InterruptedException
- Throws:
InterruptedException
releaseShared
public final boolean releaseShared(int arg)
hasQueuedThreads
public final boolean hasQueuedThreads()
hasContended
public final boolean hasContended()
getFirstQueuedThread
public final Thread getFirstQueuedThread()
isQueued
public final boolean isQueued(Thread thread)
getQueueLength
public final int getQueueLength()
getQueuedThreads
public final Collection getQueuedThreads()
getExclusiveQueuedThreads
public final Collection getExclusiveQueuedThreads()
getSharedQueuedThreads
public final Collection getSharedQueuedThreads()
toString
public String toString()
- Overrides:
toString in class Object
owns
public final boolean owns(AbstractQueuedSynchronizer.ConditionObject condition)
hasWaiters
public final boolean hasWaiters(AbstractQueuedSynchronizer.ConditionObject condition)
getWaitQueueLength
public final int getWaitQueueLength(AbstractQueuedSynchronizer.ConditionObject condition)
getWaitingThreads
public final Collection getWaitingThreads(AbstractQueuedSynchronizer.ConditionObject condition)
Please submit a feedback, bug or feature