LockingPolicy
public class RowLocking3Escalate extends ContainerLocking3
LockingPolicy
lf
MODE_CONTAINER, MODE_NONE, MODE_RECORD
Modifier | Constructor | Description |
---|---|---|
protected |
RowLocking3Escalate(LockFactory lf) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
lockContainer(Transaction t,
ContainerHandle container,
boolean waitForLock,
boolean forUpdate) |
Escalates Row Locking 3 to Container Locking 3.
|
getMode
lockRecordForRead, lockRecordForWrite, unlockContainer, unlockRecordAfterRead, zeroDurationLockRecordForWrite
protected 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 LockingPolicy
lockContainer
in class ContainerLocking3
t
- 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.ContainerHandle
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.