LockingPolicypublic class ContainerLocking2 extends NoLocking
LockingPolicy| Modifier and Type | Field | Description |
|---|---|---|
private LockFactory |
lf |
MODE_CONTAINER, MODE_NONE, MODE_RECORD| Modifier | Constructor | Description |
|---|---|---|
protected |
ContainerLocking2() |
|
protected |
ContainerLocking2(LockFactory lf) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getMode() |
Get the mode of this policy
|
boolean |
lockContainer(Transaction t,
ContainerHandle container,
boolean waitForLock,
boolean forUpdate) |
Obtain a Container shared or exclusive lock until
the end of the nested transaction.
|
void |
unlockContainer(Transaction t,
ContainerHandle container) |
Unlock read locks.
|
lockRecordForRead, lockRecordForWrite, unlockRecordAfterRead, zeroDurationLockRecordForWriteprivate final LockFactory lf
protected ContainerLocking2()
protected ContainerLocking2(LockFactory lf)
public boolean lockContainer(Transaction t, ContainerHandle container, boolean waitForLock, boolean forUpdate) throws StandardException
lockContainer in interface LockingPolicylockContainer in class NoLockingt - Transaction to associate lock with.container - Container to lock.waitForLock - Should lock request wait until granted?forUpdate - Should container be locked for update, or read?StandardException - Standard Derby error policyContainerHandlepublic void unlockContainer(Transaction t, ContainerHandle container)
In Cursor stability release all read locks obtained. unlockContainer() will be called when the container is closed.
unlockContainer in interface LockingPolicyunlockContainer in class NoLockingt - The transaction to associate the lock with.container - Container to unlock.ContainerHandle,
ContainerHandle.close()public int getMode()
LockingPolicygetMode in interface LockingPolicygetMode in class NoLockingApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.