class B2IRowLocking1 extends B2IRowLocking2 implements BTreeLockingPolicy
base_cc, open_btree
Constructor and Description |
---|
B2IRowLocking1(Transaction rawtran,
int lock_level,
LockingPolicy locking_policy,
ConglomerateController base_cc,
OpenBTree open_btree)
Constructors for This class:
|
Modifier and Type | Method and Description |
---|---|
boolean |
lockScanRow(OpenBTree open_btree,
BTreeRowPosition pos,
FetchDescriptor lock_fetch_desc,
DataValueDescriptor[] lock_template,
RowLocation lock_row_loc,
boolean previous_key_lock,
boolean forUpdate,
int lock_operation)
Lock a row as part of doing the scan.
|
void |
unlockScanRecordAfterRead(BTreeRowPosition pos,
boolean forUpdate)
Release read lock on a row.
|
_lockScanRow, lockNonScanPreviousRow, lockNonScanRow, lockNonScanRowOnPage, lockScanCommittedDeletedRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lockNonScanPreviousRow, lockNonScanRow, lockNonScanRowOnPage, lockScanCommittedDeletedRow
B2IRowLocking1(Transaction rawtran, int lock_level, LockingPolicy locking_policy, ConglomerateController base_cc, OpenBTree open_btree)
public boolean lockScanRow(OpenBTree open_btree, BTreeRowPosition pos, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, boolean previous_key_lock, boolean forUpdate, int lock_operation) throws StandardException
Lock the row at the given slot (or the previous row if slot is 0).
If this routine returns true all locks were acquired while maintaining the latch on leaf. If this routine returns false, locks may or may not have been acquired, and the routine should be called again after the client has researched the tree to reget the latch on the appropriate page.
lockScanRow
in interface BTreeLockingPolicy
lockScanRow
in class B2IRowLockingRR
open_btree
- The open_btree to associate latches with -
used if routine has to scan backward.pos
- The position of the row to lock.lock_template
- A scratch area to use to read in rows.previous_key_lock
- Is this a previous key lock call?forUpdate
- Is the scan for update or for read only.lock_operation
- For what operation are we requesting the lock,
this should be one of the following 4 options:
LOCK_READ [read lock],
(LOCK_INS | LOCK_UPD) [ lock for insert],
(LOCK_INSERT_PREVKEY | LOCK_UPD) [lock for
previous key to insert],
(LOCK_UPD) [lock for delete or replace]StandardException
- Standard exception policy.public void unlockScanRecordAfterRead(BTreeRowPosition pos, boolean forUpdate) throws StandardException
unlockScanRecordAfterRead
in interface BTreeLockingPolicy
unlockScanRecordAfterRead
in class B2IRowLocking2
pos
- The position of the row to unlock.forUpdate
- Is the scan for update or for read only.StandardException
- Standard exception policy.Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.