LockingPolicy
public 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, zeroDurationLockRecordForWrite
private 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 LockingPolicy
lockContainer
in class NoLocking
t
- 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 policyContainerHandle
public 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 LockingPolicy
unlockContainer
in class NoLocking
t
- The transaction to associate the lock with.container
- Container to unlock.ContainerHandle
,
ContainerHandle.close()
public int getMode()
LockingPolicy
getMode
in interface LockingPolicy
getMode
in class NoLocking
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.