1 8 9 package com.sleepycat.je.txn; 10 11 import java.util.Set ; 12 13 import com.sleepycat.je.DatabaseException; 14 import com.sleepycat.je.LockStats; 15 import com.sleepycat.je.dbi.DatabaseImpl; 16 import com.sleepycat.je.dbi.EnvironmentImpl; 17 import com.sleepycat.je.dbi.MemoryBudget; 18 19 22 public class DummyLockManager extends LockManager { 23 24 public DummyLockManager(EnvironmentImpl envImpl) 25 throws DatabaseException { 26 27 super(envImpl); 28 } 29 30 33 protected LockAttemptResult attemptLock(Long nodeId, 34 Locker locker, 35 LockType type, 36 boolean nonBlockingRequest) 37 throws DatabaseException { 38 39 return new LockAttemptResult(null, LockGrantType.NEW, true); 40 } 41 42 45 protected String makeTimeoutMsg(String lockOrTxn, 46 Locker locker, 47 long nodeId, 48 LockType type, 49 LockGrantType grantType, 50 Lock useLock, 51 long timeout, 52 long start, 53 long now, 54 DatabaseImpl database) { 55 56 return null; 57 } 58 59 62 protected Set releaseAndFindNotifyTargets(long nodeId, 63 Lock lock, 64 Locker locker, 65 boolean removeFromLocker) 66 throws DatabaseException { 67 68 return null; 69 } 70 71 74 void transfer(long nodeId, 75 Locker owningLocker, 76 Locker destLocker, 77 boolean demoteToRead) 78 throws DatabaseException { 79 80 } 81 82 85 void transferMultiple(long nodeId, 86 Locker owningLocker, 87 Locker[] destLockers) 88 throws DatabaseException { 89 90 } 91 92 95 void demote(long nodeId, Locker locker) 96 throws DatabaseException { 97 98 } 99 100 103 boolean isLocked(Long nodeId) { 104 105 return false; 106 } 107 108 111 boolean isOwner(Long nodeId, Locker locker, LockType type) { 112 113 return false; 114 } 115 116 119 boolean isWaiter(Long nodeId, Locker locker) { 120 121 return false; 122 } 123 124 127 int nWaiters(Long nodeId) { 128 129 return 0; 130 } 131 132 135 int nOwners(Long nodeId) { 136 137 return 0; 138 } 139 140 143 Locker getWriteOwnerLocker(Long nodeId) 144 throws DatabaseException { 145 146 return null; 147 } 148 149 152 protected boolean validateOwnership(Long nodeId, 153 Locker locker, 154 LockType type, 155 boolean flushFromWaiters, 156 MemoryBudget mb) 157 throws DatabaseException { 158 159 return true; 160 } 161 162 165 protected void dumpLockTable(LockStats stats) 166 throws DatabaseException { 167 168 } 169 } 170 | Popular Tags |