|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
org.codehaus.groovy.util.LockableObject
public class LockableObject
A bit simplified lock designed to be inherited by.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
---|
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject |
Constructor Summary | |
---|---|
LockableObject()
|
Method Summary | |
---|---|
protected boolean |
isHeldExclusively()
|
void |
lock()
|
protected boolean |
tryAcquire(int acquires)
|
protected boolean |
tryRelease(int releases)
|
void |
unlock()
|
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
---|
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared |
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer |
---|
getExclusiveOwnerThread, setExclusiveOwnerThread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LockableObject()
Method Detail |
---|
protected final boolean isHeldExclusively()
isHeldExclusively
in class java.util.concurrent.locks.AbstractQueuedSynchronizer
public final void lock()
public final void unlock()
protected final boolean tryAcquire(int acquires)
tryAcquire
in class java.util.concurrent.locks.AbstractQueuedSynchronizer
protected final boolean tryRelease(int releases)
tryRelease
in class java.util.concurrent.locks.AbstractQueuedSynchronizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |