class NoLocking extends java.lang.Object implements LockingPolicy
LockingPolicyMODE_CONTAINER, MODE_NONE, MODE_RECORD| Modifier | Constructor and Description |
|---|---|
protected |
NoLocking() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMode()
Get the mode of this policy
|
boolean |
lockContainer(Transaction t,
ContainerHandle container,
boolean waitForLock,
boolean forUpdate)
Called when a container is opened.
|
boolean |
lockRecordForRead(Transaction t,
ContainerHandle container,
RecordHandle record,
boolean waitForLock,
boolean forUpdate)
Called before a record is fetched.
|
boolean |
lockRecordForWrite(Transaction t,
RecordHandle record,
boolean lockForInsert,
boolean waitForLock)
Called before a record is inserted, updated or deleted.
|
void |
unlockContainer(Transaction t,
ContainerHandle container)
Called when a container is closed.
|
void |
unlockRecordAfterRead(Transaction t,
ContainerHandle container,
RecordHandle record,
boolean forUpdate,
boolean row_qualified)
Called after a record has been fetched.
|
boolean |
zeroDurationLockRecordForWrite(Transaction t,
RecordHandle record,
boolean lockForPreviousKey,
boolean waitForLock)
Request a write lock which will be released immediately upon grant.
|
public boolean lockContainer(Transaction t, ContainerHandle container, boolean waitForLock, boolean forUpdate) throws StandardException
LockingPolicylockContainer in interface LockingPolicyt - 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)
LockingPolicyunlockContainer in interface LockingPolicyContainerHandle,
ContainerHandle.close()public boolean lockRecordForRead(Transaction t, ContainerHandle container, RecordHandle record, boolean waitForLock, boolean forUpdate) throws StandardException
LockingPolicylockRecordForRead in interface LockingPolicyt - Transaction to associate lock with.container - Open Container used to get record. Will be used
to row locks by the container they belong to.record - Record to lock.waitForLock - Should lock request wait until granted?forUpdate - Should container be locked for update, or read?StandardException - Standard Derby error policyPagepublic boolean zeroDurationLockRecordForWrite(Transaction t, RecordHandle record, boolean lockForPreviousKey, boolean waitForLock) throws StandardException
LockingPolicyzeroDurationLockRecordForWrite in interface LockingPolicyt - Transaction to associate lock with.record - Record to lock.lockForPreviousKey - Lock is for a previous key of a insert.waitForLock - Should lock request wait until granted?StandardException - Standard Derby error policyPagepublic boolean lockRecordForWrite(Transaction t, RecordHandle record, boolean lockForInsert, boolean waitForLock) throws StandardException
LockingPolicylockRecordForWrite in interface LockingPolicyt - Transaction to associate lock with.record - Record to lock.lockForInsert - Lock is for an insert.waitForLock - Should lock request wait until granted?StandardException - Standard Derby error policyPagepublic void unlockRecordAfterRead(Transaction t, ContainerHandle container, RecordHandle record, boolean forUpdate, boolean row_qualified) throws StandardException
LockingPolicyunlockRecordAfterRead in interface LockingPolicyStandardException - Standard Derby error policyPagepublic int getMode()
LockingPolicygetMode in interface LockingPolicyApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.