1 8 9 package com.sleepycat.je.txn; 10 11 16 class LockUpgrade { 17 18 static final LockUpgrade ILLEGAL = new LockUpgrade 19 (null, false, true); 20 static final LockUpgrade EXISTING = new LockUpgrade 21 (null, false, false); 22 static final LockUpgrade WRITE_PROMOTE = new LockUpgrade 23 (LockType.WRITE, true, false); 24 static final LockUpgrade RANGE_READ_IMMED= new LockUpgrade 25 (LockType.RANGE_READ, false, false); 26 static final LockUpgrade RANGE_WRITE_IMMED = new LockUpgrade 27 (LockType.RANGE_WRITE, false, false); 28 static final LockUpgrade RANGE_WRITE_PROMOTE = new LockUpgrade 29 (LockType.RANGE_WRITE, true, false); 30 31 private LockType upgrade; 32 private boolean promotion; 33 private boolean illegal; 34 35 38 private LockUpgrade(LockType upgrade, boolean promotion, boolean illegal) { 39 this.upgrade = upgrade; 40 this.promotion = promotion; 41 this.illegal = illegal; 42 } 43 44 51 boolean getIllegal() { 52 return illegal; 53 } 54 55 63 LockType getUpgrade() { 64 return upgrade; 65 } 66 67 75 boolean getPromotion() { 76 return promotion; 77 } 78 } 79 | Popular Tags |