| java.lang.Object org.apache.derby.impl.store.access.btree.index.B2IRowLocking3 org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR org.apache.derby.impl.store.access.btree.index.B2IRowLocking2 org.apache.derby.impl.store.access.btree.index.B2IRowLocking1
B2IRowLocking1 | class B2IRowLocking1 extends B2IRowLocking2 implements BTreeLockingPolicy(Code) | | The btree locking policy which implements read uncommitted isolation level.
It inherits all functionality from B2IRowLocking2 except that it does not
get any read row locks (and thus does not release them). Note that table
level and table level intent locking remains the same as B2IRowLocking2 as
this is currently the way we prevent concurrent ddl from happening while a
read uncommitted scanner is operating in the btree.
|
Method Summary | |
public boolean | lockScanRow(OpenBTree open_btree, BTree btree, BTreeRowPosition pos, boolean request_scan_lock, 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.
Lock the row at the given slot (or the previous row if slot is 0).
Get the scan lock on the page if "request_scan_lock" is true.
If this routine returns true all locks were acquired while maintaining
the latch on leaf. | public void | unlockScanRecordAfterRead(BTreeRowPosition pos, boolean forUpdate) Release read lock on a row.
Because this is read uncommitted no S row locks will have been requested,
thus none need be released. |
lockScanRow | public boolean lockScanRow(OpenBTree open_btree, BTree btree, BTreeRowPosition pos, boolean request_scan_lock, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, boolean previous_key_lock, boolean forUpdate, int lock_operation) throws StandardException(Code) | | Lock a row as part of doing the scan.
Lock the row at the given slot (or the previous row if slot is 0).
Get the scan lock on the page if "request_scan_lock" is true.
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.
(p>
As a side effect stores the value of the record handle of the current
scan lock.
Whether locks were acquired without releasing latch on leaf. Parameters: open_btree - The open_btree to associate latches with - used if routine has to scan backward. Parameters: btree - the conglomerate info. Parameters: pos - The position of the row to lock. Parameters: request_scan_lock - Whether to request the page scan lock, shouldonly be requested once per page in the scan. Parameters: lock_template - A scratch area to use to read in rows. Parameters: previous_key_lock - Is this a previous key lock call? Parameters: forUpdate - Is the scan for update or for read only. exception: StandardException - Standard exception policy. |
unlockScanRecordAfterRead | public void unlockScanRecordAfterRead(BTreeRowPosition pos, boolean forUpdate) throws StandardException(Code) | | Release read lock on a row.
Because this is read uncommitted no S row locks will have been requested,
thus none need be released. The only locks that need to be released
are U locks requested if the scan was opened for update.
Parameters: pos - The position of the row to unlock. Parameters: forUpdate - Is the scan for update or for read only. |
Methods inherited from org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR | public boolean lockScanRow(OpenBTree open_btree, BTree btree, BTreeRowPosition pos, boolean request_scan_lock, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, boolean previous_key_lock, boolean forUpdate, int lock_operation) throws StandardException(Code)(Java Doc) public void unlockScanRecordAfterRead(BTreeRowPosition pos, boolean forUpdate) throws StandardException(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.store.access.btree.index.B2IRowLocking3 | protected boolean _lockScanRow(OpenBTree open_btree, BTree btree, BTreeRowPosition pos, boolean request_row_lock, boolean request_scan_lock, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, boolean previous_key_lock, boolean forUpdate, int lock_operation) throws StandardException(Code)(Java Doc) public boolean lockNonScanPreviousRow(BTree btree, LeafControlRow current_leaf, int current_slot, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, OpenBTree open_btree, int lock_operation, int lock_duration) throws StandardException(Code)(Java Doc) public boolean lockNonScanRow(BTree btree, LeafControlRow current_leaf, LeafControlRow aux_leaf, DataValueDescriptor[] current_row, int lock_operation) throws StandardException(Code)(Java Doc) public boolean lockNonScanRowOnPage(BTree btree, LeafControlRow current_leaf, int current_slot, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, int lock_operation) throws StandardException(Code)(Java Doc) public boolean lockScan(LeafControlRow current_leaf, ControlRow aux_control_row, boolean forUpdate, int lock_operation) throws StandardException(Code)(Java Doc) public boolean lockScanCommittedDeletedRow(OpenBTree open_btree, LeafControlRow leaf, DataValueDescriptor[] template, FetchDescriptor lock_fetch_desc, int slot_no) throws StandardException(Code)(Java Doc) public boolean lockScanForReclaimSpace(LeafControlRow current_leaf) throws StandardException(Code)(Java Doc) public boolean lockScanRow(OpenBTree open_btree, BTree btree, BTreeRowPosition pos, boolean request_scan_lock, FetchDescriptor lock_fetch_desc, DataValueDescriptor[] lock_template, RowLocation lock_row_loc, boolean previous_key_lock, boolean forUpdate, int lock_operation) throws StandardException(Code)(Java Doc) public void unlockScan(long page_number)(Code)(Java Doc) public void unlockScanRecordAfterRead(BTreeRowPosition pos, boolean forUpdate) throws StandardException(Code)(Java Doc)
|
|
|