private static final class ConcurrentLockSet.Entry
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
(package private) Control |
control |
The lock control.
|
private java.util.concurrent.locks.Condition |
deadlockDetection |
Condition variable which prevents calls to
lock() from
locking the entry. |
private java.util.concurrent.locks.ReentrantLock |
mutex |
Mutex used to ensure single-threaded access to the LockControls.
|
Modifier | Constructor | Description |
---|---|---|
private |
Entry() |
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
enterDeadlockDetection() |
Notify that the lock request that is currently accessing the entry
will be entering deadlock detection.
|
(package private) void |
exitDeadlockDetection() |
Notify that the deadlock detection triggered by the current thread
has finished.
|
(package private) void |
lock() |
Lock the entry, ensuring exclusive access to the contained
Control object. |
(package private) void |
lockForDeadlockDetection() |
Lock the entry while performing deadlock detection.
|
(package private) void |
unlock() |
Unlock the entry, allowing other threads to lock and access the
contained
Control object. |
Control control
private final java.util.concurrent.locks.ReentrantLock mutex
private java.util.concurrent.locks.Condition deadlockDetection
lock()
from
locking the entry. If it is not null
, only the thread
performing deadlock detection may lock the entry (by calling
lockForDeadlockDetection()
).void lock()
Control
object. The call will block until the entry can
be locked. If the entry is unlocked and
deadlockDetection
is not null
, the entry
belongs to a thread which waits for deadlock detection to be
initiated, and the call will block until that thread has finished
its deadlock detection.void unlock()
Control
object.void lockForDeadlockDetection()
deadlockDetection
is not
null
. If deadlockDetection
is not
null
, we know the entry and its Control
will not be accessed by others until we have finished the deadlock
detection, so it's OK for us to access it.void enterDeadlockDetection()
void exitDeadlockDetection()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.