| Modifier and Type | Method and Description |
|---|---|
| public void | addWaiters(Map<Object, Object>
the map to add the waiters to waiters)Add all waiters in the lock table to the specified map. |
| public boolean | Returns: true if someone is blocked, false
otherwiseCheck whether there are anyone blocked in the lock table. |
| public int | |
| public Lock | Returns: a reference to the lock, ornull if the lock
couldn't be obtained immediately and the timeout was NO_WAIT
or LockOwner had the noWait flag setthe compatibility space compatibilitySpace, Lockable the object to lock ref, Object qualifier of the lock qualifier, int maximum time to wait in milliseconds
( timeout)C_LockFactory.NO_WAIT means don't wait)Lock an object. |
| public void | |
| public void | |
| public void | |
| public void | setDeadlockTrace(boolean
true enables tracing, false
disables tracingEnable or disable tracing of deadlocks. |
| public void | |
| public Map | Returns: a shallow clone of the lock tableCreate a map containing a snapshot of all the ( |
| public void | |
| public Lock | Returns: the corresponding lock in the group map, ornull if
the object was not unlockedthe compatibility space space, Lockable a reference to the locked object ref, Object qualifier of the lock qualifier, Map<K, V> a map representing the locks in a group group)Unlock an object once if it is present in the specified group. |
| public boolean | Returns: true if the object was locked, or
false if the object couldn't be locked immediately and timeout
was NO_WAIT or LockOwner had the noWait flag setthe compatibility space space, Lockable a reference to the locked object ref, Object qualifier of the lock qualifier, int maximum time to wait in milliseconds
( timeout)C_LockFactory.NO_WAIT means don't wait)Lock an object and release the lock immediately. |
| addWaiters | back to summary |
|---|---|
| public void addWaiters(Map<Object, Object> waiters) Add all waiters in the lock table to the specified map.
| |
| anyoneBlocked | back to summary |
|---|---|
| public boolean anyoneBlocked() Check whether there are anyone blocked in the lock table.
| |
| getWaitTimeout | back to summary |
|---|---|
| public int getWaitTimeout() Get the wait timeout in milliseconds. | |
| lockObject | back to summary |
|---|---|
| public Lock lockObject(CompatibilitySpace compatibilitySpace, Lockable ref, Object qualifier, int timeout) throws StandardException Lock an object.
| |
| oneLessWaiter | back to summary |
|---|---|
| public void oneLessWaiter() Notify the lock table that it has one less waiter. | |
| oneMoreWaiter | back to summary |
|---|---|
| public void oneMoreWaiter() Notify the lock table that it has one more waiter. | |
| setDeadlockTimeout | back to summary |
|---|---|
| public void setDeadlockTimeout(int timeout) Set the deadlock timeout.
| |
| setDeadlockTrace | back to summary |
|---|---|
| public void setDeadlockTrace(boolean flag) Enable or disable tracing of deadlocks.
| |
| setWaitTimeout | back to summary |
|---|---|
| public void setWaitTimeout(int timeout) Set the wait timeout.
| |
| shallowClone | back to summary |
|---|---|
| public Map Create a map containing a snapshot of all the (
| |
| unlock | back to summary |
|---|---|
| public void unlock(Latch item, int unlockCount) Unlock an object previously locked by
| |
| unlockReference | back to summary |
|---|---|
| public Lock unlockReference(CompatibilitySpace space, Lockable ref, Object qualifier, Map<K, V> group) Unlock an object once if it is present in the specified group. Also remove the object from the group.
| |
| zeroDurationLockObject | back to summary |
|---|---|
| public boolean zeroDurationLockObject(CompatibilitySpace space, Lockable ref, Object qualifier, int timeout) throws StandardException Lock an object and release the lock immediately. Equivalent to Lock lock = lockTable.lockObject(space, ref, qualifier, timeout); lockTable.unlock(lock, 1);except that the implementation might be more efficient.
| |