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:
- Serializable
- Direct Known Subclasses:
- LazyReference
A bit simplified lock designed to be inherited by.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizerAbstractQueuedSynchronizer.ConditionObject
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected final booleanfinal voidlock()protected final booleantryAcquire(int acquires) protected final booleantryRelease(int releases) final voidunlock()Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizeracquire, 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, tryReleaseSharedMethods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizergetExclusiveOwnerThread, setExclusiveOwnerThread
- 
Constructor Details- 
LockableObjectpublic LockableObject()
 
- 
- 
Method Details- 
isHeldExclusivelyprotected final boolean isHeldExclusively()- Overrides:
- isHeldExclusivelyin class- AbstractQueuedSynchronizer
 
- 
lockpublic final void lock()
- 
unlockpublic final void unlock()
- 
tryAcquireprotected final boolean tryAcquire(int acquires) - Overrides:
- tryAcquirein class- AbstractQueuedSynchronizer
 
- 
tryReleaseprotected final boolean tryRelease(int releases) - Overrides:
- tryReleasein class- AbstractQueuedSynchronizer
 
 
-