Sync object extends AbstractOwnableSynchronizer, hence monitoring is possible.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final RecursiveLockImpl01CompleteFair. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final int | getHoldCount()
Implements com. |
| public final Throwable | getLockedStack()
Returns the Throwable instance generated when this lock was taken the 1st time
and if |
| public final Thread | |
| public final int | |
| public final boolean | |
| public final boolean | isLockedByOtherThread()
Implements com. |
| public final boolean | isOwner(final Thread thread)
Implements com. |
| public final void | lock()
Implements com. TIMEOUT is reached.
|
| private final String | |
| private final String | |
| public String | |
| public final boolean | tryLock(long
Maximum time in ms to wait to acquire the lock. If this value is zero,
the call returns immediately either without being able
to acquire the lock, or with acquiring the lock directly while ignoring any scheduling order. timeout)Implements com. maxwait in ms is reached.
|
| public final void | |
| public final void | unlock(final Runnable taskAfterUnlockBeforeNotify)
Implements com. Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock.
|
| public final void |
| sync | back to summary |
|---|---|
| private final RecursiveLockImpl01CompleteFair. | |
| RecursiveLockImpl01CompleteFair | back to summary |
|---|---|
| public RecursiveLockImpl01CompleteFair() | |
| getHoldCount | back to summary |
|---|---|
| public final int getHoldCount() Implements com. Doc from com. Return the number of locks issued to this lock by the same thread.
| |
| getLockedStack | back to summary |
|---|---|
| public final Throwable getLockedStack() Returns the Throwable instance generated when this lock was taken the 1st time
and if | |
| getOwner | back to summary |
|---|---|
| public final Thread getOwner() Implements com.
| |
| getQueueLength | back to summary |
|---|---|
| public final int getQueueLength() Implements com.
| |
| isLocked | back to summary |
|---|---|
| public final boolean isLocked() Implements com. Doc from com. Query if locked
| |
| isLockedByOtherThread | back to summary |
|---|---|
| public final boolean isLockedByOtherThread() Implements com. Doc from com. Query whether the lock is hold by the a thread other than the current thread.
| |
| isOwner | back to summary |
|---|---|
| public final boolean isOwner(final Thread thread) Implements com. Doc from com. Query whether the lock is hold by the given thread.
| |
| lock | back to summary |
|---|---|
| public final void lock() Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| syncName | back to summary |
|---|---|
| private final String syncName() | |
| threadName | back to summary |
|---|---|
| private final String threadName(final Thread t) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| tryLock | back to summary |
|---|---|
| public final boolean tryLock(long timeout) throws InterruptedException Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| unlock | back to summary |
|---|---|
| public final void unlock() Implements com. Doc from com. Release the lock.
| |
| unlock | back to summary |
|---|---|
| public final void unlock(final Runnable taskAfterUnlockBeforeNotify) Implements com. Doc from com. Execute the Then release the lock.
| |
| validateLocked | back to summary |
|---|---|
| public final void validateLocked() throws RuntimeException Implements com.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | holdCount
lock count by same thread |
| private Throwable | lockedStack
stack trace of the lock, only used if DEBUG |
| pack-priv final ArrayList | queue
waiting thread queue |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private final Thread | |
| private final void | |
| private final void |
| holdCount | back to summary |
|---|---|
| private int holdCount lock count by same thread | |
| lockedStack | back to summary |
|---|---|
| private Throwable lockedStack stack trace of the lock, only used if DEBUG | |
| queue | back to summary |
|---|---|
| pack-priv final ArrayList<RecursiveLockImpl01CompleteFair. waiting thread queue | |
| Sync | back to summary |
|---|---|
| private Sync() | |
| getOwner | back to summary |
|---|---|
| private final Thread getOwner() | |
| setLockedStack | back to summary |
|---|---|
| private final void setLockedStack(final Throwable s) | |
| setOwner | back to summary |
|---|---|
| private final void setOwner(final Thread t) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv final Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| signaledByUnlock | back to summary |
|---|---|
| pack-priv boolean signaledByUnlock | |
| thread | back to summary |
|---|---|
| pack-priv final Thread thread | |
| WaitingThread | back to summary |
|---|---|
| pack-priv WaitingThread(final Thread t) | |