Package org.codehaus.groovy.util
Class LockableObject
- java.lang.Object
 - 
- java.util.concurrent.locks.AbstractOwnableSynchronizer
 - 
- java.util.concurrent.locks.AbstractQueuedSynchronizer
 - 
- org.codehaus.groovy.util.LockableObject
 
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable
- Direct Known Subclasses:
 AbstractConcurrentMapBase.Segment,LazyReference
public class LockableObject extends java.util.concurrent.locks.AbstractQueuedSynchronizerA bit simplified lock designed to be inherited by.- See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description LockableObject() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisHeldExclusively()voidlock()protected booleantryAcquire(int acquires)protected booleantryRelease(int releases)voidunlock()- 
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared 
 - 
 
 - 
 
- 
- 
Method Detail
- 
isHeldExclusively
protected final boolean isHeldExclusively()
- Overrides:
 isHeldExclusivelyin classjava.util.concurrent.locks.AbstractQueuedSynchronizer
 
- 
lock
public final void lock()
 
- 
unlock
public final void unlock()
 
- 
tryAcquire
protected final boolean tryAcquire(int acquires)
- Overrides:
 tryAcquirein classjava.util.concurrent.locks.AbstractQueuedSynchronizer
 
- 
tryRelease
protected final boolean tryRelease(int releases)
- Overrides:
 tryReleasein classjava.util.concurrent.locks.AbstractQueuedSynchronizer
 
 - 
 
 -