|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.locks.ReentrantLock.Sync
abstract static class ReentrantLock.Sync
Base of synchronization control for this lock. Subclassed into fair and nonfair versions below. Uses AQS state to represent the number of holds on the lock.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer |
|---|
AbstractQueuedSynchronizer.ConditionObject, AbstractQueuedSynchronizer.Node |
| Field Summary | |
|---|---|
(package private) Thread |
owner
Current owner thread |
| Constructor Summary | |
|---|---|
ReentrantLock.Sync()
|
|
| Method Summary | |
|---|---|
(package private) int |
getHoldCount()
|
(package private) Thread |
getOwner()
|
protected boolean |
isHeldExclusively()
Returns true if synchronization is held exclusively with respect to the current (calling) thread. |
(package private) boolean |
isLocked()
|
(package private) abstract void |
lock()
Perform Lock.lock(). |
(package private) AbstractQueuedSynchronizer.ConditionObject |
newCondition()
|
(package private) boolean |
nonfairTryAcquire(int acquires)
Perform non-fair tryLock. |
protected boolean |
tryRelease(int releases)
Attempts to set the state to reflect a release in exclusive mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
transient Thread owner
| Constructor Detail |
|---|
ReentrantLock.Sync()
| Method Detail |
|---|
abstract void lock()
Lock.lock(). The main reason for subclassing
is to allow fast path for nonfair version.
final boolean nonfairTryAcquire(int acquires)
protected final boolean tryRelease(int releases)
AbstractQueuedSynchronizerThis method is always invoked by the thread performing release.
The default implementation throws
UnsupportedOperationException
tryRelease in class AbstractQueuedSynchronizerreleases - the release argument. This value
is always the one passed to a release method,
or the current state value upon entry to a condition wait.
The value is otherwise uninterpreted and can represent anything
you like.
protected final boolean isHeldExclusively()
AbstractQueuedSynchronizerAbstractQueuedSynchronizer.ConditionObject method.
(Waiting methods instead invoke AbstractQueuedSynchronizer.release(int).)
The default implementation throws UnsupportedOperationException. This method is invoked
internally only within AbstractQueuedSynchronizer.ConditionObject methods, so need
not be defined if conditions are not used.
isHeldExclusively in class AbstractQueuedSynchronizerfinal AbstractQueuedSynchronizer.ConditionObject newCondition()
final Thread getOwner()
final int getHoldCount()
final boolean isLocked()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||