1 21 22 package org.apache.derby.impl.store.raw.xact; 23 24 import org.apache.derby.iapi.services.locks.Latch; 25 26 import org.apache.derby.iapi.store.raw.LockingPolicy; 27 import org.apache.derby.iapi.store.raw.ContainerHandle; 28 import org.apache.derby.iapi.store.raw.RecordHandle; 29 import org.apache.derby.iapi.store.raw.Transaction; 30 31 import org.apache.derby.iapi.error.StandardException; 32 33 34 39 class NoLocking implements LockingPolicy { 40 41 protected NoLocking() { 42 } 43 44 public boolean lockContainer( 45 Transaction t, 46 ContainerHandle container, 47 boolean waitForLock, 48 boolean forUpdate) 49 throws StandardException { 50 return true; 51 } 52 53 public void unlockContainer( 54 Transaction t, 55 ContainerHandle container) 56 { 57 } 58 59 public boolean lockRecordForRead( 60 Transaction t, 61 ContainerHandle container, 62 RecordHandle record, 63 boolean waitForLock, 64 boolean forUpdate) 65 throws StandardException 66 { 67 return true; 68 } 69 70 public void lockRecordForRead( 71 Latch latch, 72 RecordHandle record, 73 boolean forUpdate) 74 throws StandardException 75 { 76 } 77 78 public boolean zeroDurationLockRecordForWrite( 79 Transaction t, 80 RecordHandle record, 81 boolean lockForPreviousKey, 82 boolean waitForLock) 83 throws StandardException 84 { 85 return true; 86 } 87 88 public boolean lockRecordForWrite( 89 Transaction t, 90 RecordHandle record, 91 boolean lockForInsert, 92 boolean waitForLock) 93 throws StandardException 94 { 95 return true; 96 } 97 98 public void lockRecordForWrite( 99 Latch latch, 100 RecordHandle record) 101 throws StandardException 102 { 103 } 104 105 public void unlockRecordAfterRead( 106 Transaction t, 107 ContainerHandle container, 108 RecordHandle record, 109 boolean forUpdate, 110 boolean row_qualified) 111 throws StandardException 112 { 113 } 114 115 public int getMode() { 116 return LockingPolicy.MODE_NONE; 117 } 118 119 } 120 | Popular Tags |