1 21 22 package org.apache.derby.impl.store.access.btree.index; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import org.apache.derby.iapi.error.StandardException; 27 28 import org.apache.derby.iapi.store.access.conglomerate.TransactionManager; 29 30 import org.apache.derby.iapi.store.access.ConglomerateController; 31 import org.apache.derby.iapi.types.RowLocation; 32 import org.apache.derby.iapi.store.access.TransactionController; 33 34 import org.apache.derby.iapi.store.raw.FetchDescriptor; 35 import org.apache.derby.iapi.store.raw.LockingPolicy; 36 import org.apache.derby.iapi.store.raw.Page; 37 import org.apache.derby.iapi.store.raw.RecordHandle; 38 import org.apache.derby.iapi.store.raw.Transaction; 39 40 import org.apache.derby.iapi.types.DataValueDescriptor; 41 42 import org.apache.derby.impl.store.access.btree.BTree; 43 import org.apache.derby.impl.store.access.btree.BTreeLockingPolicy; 44 import org.apache.derby.impl.store.access.btree.BTreeRowPosition; 45 import org.apache.derby.impl.store.access.btree.ControlRow; 46 import org.apache.derby.impl.store.access.btree.LeafControlRow; 47 import org.apache.derby.impl.store.access.btree.OpenBTree; 48 import org.apache.derby.impl.store.access.btree.WaitError; 49 50 53 54 class B2IRowLockingRR extends B2IRowLocking3 implements BTreeLockingPolicy 55 { 56 57 61 B2IRowLockingRR( 62 Transaction rawtran, 63 int lock_level, 64 LockingPolicy locking_policy, 65 ConglomerateController base_cc, 66 OpenBTree open_btree) 67 { 68 super(rawtran, lock_level, locking_policy, base_cc, open_btree); 69 } 70 71 75 76 105 public boolean lockScanRow( 106 OpenBTree open_btree, 107 BTree btree, 108 BTreeRowPosition pos, 109 boolean request_scan_lock, 110 FetchDescriptor lock_fetch_desc, 111 DataValueDescriptor[] lock_template, 112 RowLocation lock_row_loc, 113 boolean previous_key_lock, 114 boolean forUpdate, 115 int lock_operation) 116 throws StandardException 117 { 118 return( 121 _lockScanRow( 122 open_btree, 123 btree, 124 pos, 125 !previous_key_lock, request_scan_lock, 127 lock_fetch_desc, lock_template, lock_row_loc, 128 previous_key_lock, 129 forUpdate, 130 lock_operation)); 131 } 132 133 150 public void unlockScanRecordAfterRead( 151 BTreeRowPosition pos, 152 boolean forUpdate) 153 throws StandardException 154 { 155 if (!pos.current_rh_qualified) 156 { 157 if (SanityManager.DEBUG) 158 { 159 SanityManager.ASSERT(pos.current_leaf != null , "leaf is null"); 160 161 SanityManager.ASSERT( 162 pos.current_lock_row_loc != null , "row_loc is null"); 163 } 164 165 base_cc.unlockRowAfterRead( 166 pos.current_lock_row_loc, forUpdate, pos.current_rh_qualified); 167 } 168 } 169 } 170 | Popular Tags |