public Transaction(ServerCore core, Guid transactionId) { _core = core; IsImplicit = false; Id = transactionId; DeferredIO = new DeferredIO(core); }
/// <summary> /// Decreases the transaction reference count. If it falls to zero, the transaction is comitted. /// </summary> /// <returns></returns> public bool Commit() { _references--; if (_references < 0) { throw new Exception("Transaction reference count fell below zero."); } if (_references == 0) { _latchKeys.TurnInAllKeys(); if (Directory.Exists(TransactionBackupPath)) { Directory.Delete(TransactionBackupPath, true); } DeferredIO.Commit(); return(true); } return(false); }
public Transaction(ServerCore core, Session session, bool isImplicit) { _core = core; IsImplicit = isImplicit; _session = session; Id = Guid.NewGuid(); DeferredIO = new DeferredIO(core); }