| Modifier and Type | Field and Description |
|---|---|
| pack-priv ReentrantLock | |
| pack-priv volatile Thread |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | getHoldCount()
Implements com. |
| public Thread | |
| public int | |
| public boolean | |
| public boolean | isLockedByOtherThread()
Implements com. |
| public boolean | isOwner(final Thread thread)
Implements com. |
| public void | lock()
Implements com. TIMEOUT is reached.
|
| private String | |
| public boolean | tryLock(final 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 void | |
| public void | unlock(final Runnable taskAfterUnlockBeforeNotify)
Implements com. Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock.
|
| public void |
| lock | back to summary |
|---|---|
| pack-priv ReentrantLock lock | |
| owner | back to summary |
|---|---|
| pack-priv volatile Thread owner | |
| RecursiveLockImplJava5 | back to summary |
|---|---|
| public RecursiveLockImplJava5(final boolean fair) | |
| getHoldCount | back to summary |
|---|---|
| public int getHoldCount() Implements com. Doc from com. Return the number of locks issued to this lock by the same thread.
| |
| getOwner | back to summary |
|---|---|
| public Thread getOwner() Implements com.
| |
| getQueueLength | back to summary |
|---|---|
| public int getQueueLength() Implements com.
| |
| isLocked | back to summary |
|---|---|
| public boolean isLocked() Implements com. Doc from com. Query if locked
| |
| isLockedByOtherThread | back to summary |
|---|---|
| public 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 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 void lock() Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| threadName | back to summary |
|---|---|
| private String threadName(final Thread t) | |
| tryLock | back to summary |
|---|---|
| public boolean tryLock(final long timeout) throws InterruptedException Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| unlock | back to summary |
|---|---|
| public void unlock() throws RuntimeException Implements com. Doc from com. Release the lock.
| |
| unlock | back to summary |
|---|---|
| public void unlock(final Runnable taskAfterUnlockBeforeNotify) Implements com. Doc from com. Execute the Then release the lock.
| |
| validateLocked | back to summary |
|---|---|
| public void validateLocked() throws RuntimeException Implements com.
| |