1 21 22 package org.apache.derby.impl.store.raw.xact; 23 24 import org.apache.derby.iapi.services.locks.LockFactory; 25 import org.apache.derby.iapi.services.locks.C_LockFactory; 26 import org.apache.derby.iapi.services.locks.Latch; 27 28 import org.apache.derby.iapi.services.sanity.SanityManager; 29 30 import org.apache.derby.iapi.store.raw.ContainerHandle; 31 import org.apache.derby.iapi.store.raw.ContainerLock; 32 import org.apache.derby.iapi.store.raw.LockingPolicy; 33 import org.apache.derby.iapi.store.raw.RecordHandle; 34 import org.apache.derby.iapi.store.raw.RowLock; 35 import org.apache.derby.iapi.store.raw.Transaction; 36 37 import org.apache.derby.iapi.error.StandardException; 38 39 40 65 public class RowLocking1 extends RowLocking2 66 { 67 68 protected RowLocking1(LockFactory lf) 69 { 70 super(lf); 71 } 72 73 91 public boolean lockRecordForRead( 92 Transaction t, 93 ContainerHandle container_handle, 94 RecordHandle record, 95 boolean waitForLock, 96 boolean forUpdate) 97 throws StandardException 98 { 99 100 return( 101 !forUpdate ? 102 true : 103 super.lockRecordForRead( 104 t, container_handle, record, waitForLock, forUpdate)); 105 } 106 107 120 public void lockRecordForRead( 121 Latch latch, 122 RecordHandle record, 123 boolean forUpdate) 124 throws StandardException 125 { 126 if (forUpdate) 127 super.lockRecordForRead(latch, record, forUpdate); 128 } 129 130 public void unlockRecordAfterRead( 131 Transaction t, 132 ContainerHandle container_handle, 133 RecordHandle record, 134 boolean forUpdate, 135 boolean row_qualified) 136 throws StandardException 137 { 138 if (forUpdate) 139 { 140 super.unlockRecordAfterRead( 141 t, container_handle, record, forUpdate, row_qualified); 142 } 143 return; 144 } 145 } 146 | Popular Tags |