public static void UnLockStatic(StmTransaction <T> stmTransaction) { foreach (StmRef <T> stmRef in stmTransaction.inTxDict.Keys) { Monitor.Exit(stmRef.lockObj); } stmTransaction.isLockedCommit = false; }
public static void LockStatic(StmTransaction <T> stmTransaction) { foreach (StmRef <T> stmRef in stmTransaction.inTxDict.Keys) { Monitor.Enter(stmRef.lockObj); } stmTransaction.isLockedCommit = true; }
public void Commit() { StmTransaction <T> .LockStatic(stmTransaction); try { stmTransaction.Commit(); logger.Log(MethodBase.GetCurrentMethod(), stmTransaction.Revision); } finally { StmTransaction <T> .UnLockStatic(stmTransaction); } }
public LoggingStmTransaction(StmTransaction <T> stmTransaction) { this.stmTransaction = stmTransaction; }