1 21 22 package org.apache.derby.iapi.store.raw; 23 24 import org.apache.derby.iapi.services.locks.Latch; 25 26 import org.apache.derby.iapi.error.StandardException; 27 28 59 60 public interface LockingPolicy { 61 62 68 static final int MODE_NONE = 0; 69 70 73 static final int MODE_RECORD = 1; 74 75 78 static final int MODE_CONTAINER = 2; 79 80 97 public boolean lockContainer( 98 Transaction t, 99 ContainerHandle container, 100 boolean waitForLock, 101 boolean forUpdate) 102 throws StandardException; 103 104 110 public void unlockContainer( 111 Transaction t, 112 ContainerHandle container); 113 114 130 public boolean lockRecordForRead( 131 Transaction t, 132 ContainerHandle container, 133 RecordHandle record, 134 boolean waitForLock, 135 boolean forUpdate) 136 throws StandardException; 137 138 139 152 public void lockRecordForRead( 153 Latch latch, 154 RecordHandle record, 155 boolean forUpdate) 156 throws StandardException; 157 158 174 public boolean zeroDurationLockRecordForWrite( 175 Transaction t, 176 RecordHandle record, 177 boolean lockForPreviousKey, 178 boolean waitForLock) 179 throws StandardException; 180 181 200 public boolean lockRecordForWrite( 201 Transaction t, 202 RecordHandle record, 203 boolean lockForInsert, 204 boolean waitForLock) 205 throws StandardException; 206 207 218 public void lockRecordForWrite( 219 Latch latch, 220 RecordHandle record) 221 throws StandardException; 222 230 public void unlockRecordAfterRead( 231 Transaction t, 232 ContainerHandle container, 233 RecordHandle record, 234 boolean forUpdate, 235 boolean row_qualified) 236 throws StandardException; 237 238 239 242 public int getMode(); 243 } 244 | Popular Tags |