public class RowLocking3Escalate extends ContainerLocking3
LockingPolicylfMODE_CONTAINER, MODE_NONE, MODE_RECORD| Modifier | Constructor and Description |
|---|---|
protected |
RowLocking3Escalate(LockFactory lf) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
lockContainer(Transaction t,
ContainerHandle container,
boolean waitForLock,
boolean forUpdate)
Escalates Row Locking 3 to Container Locking 3.
|
getModelockRecordForRead, lockRecordForWrite, unlockContainer, unlockRecordAfterRead, zeroDurationLockRecordForWriteprotected RowLocking3Escalate(LockFactory lf)
public boolean lockContainer(Transaction t, ContainerHandle container, boolean waitForLock, boolean forUpdate) throws StandardException
This call is made by code which tracks the number of locks on a container. When the number of locks exceeds the escalate threshold the caller creates this new locking policy, calls lockContainer(), and substitues it for the old locking policy. The lockContainer call determines which table lock to get (S or X), gets that table lock, and then releases the row locks on the table. It is assumed that this is called on a open container for lock only.
lockContainer in interface LockingPolicylockContainer in class ContainerLocking3t - Transaction to associate lock with.container - Container to lock.waitForLock - Ignored - will never wait for a lock.forUpdate - Ignored, mode determined from current lock state.StandardException - Standard exception policy.ContainerHandleApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.