public bool PreCommit(Commit attempt) { var @event = new PreCommit(attempt.StreamId, attempt.StreamRevision, attempt.Events.Count); observer.Notify(@event); return(true); }
/// <summary> /// 提交事务 /// </summary> public void Commit() { //分布式事务,二阶段提交,或三阶段提交 //暂不支持 try { DisposeTimer(); CanCommit?.Invoke(); PreCommit?.Invoke(); _DoCommit?.Invoke(); } finally { CanCommit = null; PreCommit = null; _DoCommit = null; } }