1 8 9 package com.sleepycat.je.txn; 10 11 import com.sleepycat.je.tree.LN; 12 import com.sleepycat.je.utilint.DbLsn; 13 14 18 public class LockResult { 19 private LockGrantType grant; 20 private WriteLockInfo info; 21 private LN ln; 22 23 24 public LockResult(LockGrantType grant, WriteLockInfo info) { 25 this.grant = grant; 26 this.info = info; 27 } 28 29 public LN getLN() { 30 return ln; 31 } 32 33 public void setLN(LN ln) { 34 this.ln = ln; 35 } 36 37 public LockGrantType getLockGrant() { 38 return grant; 39 } 40 41 public void setAbortLsn(long abortLsn, boolean abortKnownDeleted) { 42 setAbortLsnInternal(abortLsn, abortKnownDeleted, false); 43 } 44 45 public void setAbortLsn(long abortLsn, 46 boolean abortKnownDeleted, 47 boolean createdThisTxn) { 48 setAbortLsnInternal(abortLsn, abortKnownDeleted, createdThisTxn); 49 } 50 51 private void setAbortLsnInternal(long abortLsn, 52 boolean abortKnownDeleted, 53 boolean createdThisTxn) { 54 55 if (info != null && 56 info.neverLocked) { 57 58 if (abortLsn != DbLsn.NULL_LSN) { 59 info.abortLsn = abortLsn; 60 info.abortKnownDeleted = abortKnownDeleted; 61 } 62 info.createdThisTxn = createdThisTxn; 63 info.neverLocked = false; 64 } 65 } 66 } 67 | Popular Tags |