Exemple #1
0
        public void NotifyEventCommitted(VerificationEvent @event)
        {
            _eventsForVerification.Enqueue(@event);

            var com = Interlocked.Increment(ref _totalWritten);

            if (com % NotificationStep == 0)
            {
                var table = new ConsoleTable("WORKER", "COMMITTED");
                table.AppendRow("WRITER", com.ToString());
                Log.Info(table.CreateIndentedTable());
            }
        }
Exemple #2
0
        public void NotifyEventVerified(VerificationEvent @event)
        {
            var ver = Interlocked.Increment(ref _totalVerified);

            if (ver % NotificationStep == 0)
            {
                var table = new ConsoleTable("WORKER", "VERIFIED");
                table.AppendRow("VERIFIER", ver.ToString());
                Log.Info(table.CreateIndentedTable());
            }

            var committed = _totalWritten;

            if (committed == _totalEvents)
            {
                _doneEvent.Set();
            }
        }
Exemple #3
0
        public void NotifyEventVerified(VerificationEvent @event)
        {
            var ver = Interlocked.Increment(ref _totalVerified);
            if (ver % NotificationStep == 0)
            {
                var table = new ConsoleTable("WORKER", "VERIFIED");
                table.AppendRow("VERIFIER", ver.ToString());
                Log.Info(table.CreateIndentedTable());
            }

            var committed = _totalWritten;
            if (committed == _totalEvents)
                _doneEvent.Set();
        }
Exemple #4
0
        public void NotifyEventCommitted(VerificationEvent @event)
        {
            _eventsForVerification.Enqueue(@event);

            var com = Interlocked.Increment(ref _totalWritten);
            if (com % NotificationStep == 0)
            {
                var table = new ConsoleTable("WORKER", "COMMITTED");
                table.AppendRow("WRITER", com.ToString());
                Log.Info(table.CreateIndentedTable());
            }
        }
Exemple #5
0
 public bool TryGetEventToVerify(out VerificationEvent evnt)
 {
     return _eventsForVerification.TryDequeue(out evnt);
 }
Exemple #6
0
 public bool TryGetEventToWrite(out VerificationEvent evnt)
 {
     return _eventsForWriting.TryDequeue(out evnt);
 }
Exemple #7
0
 public WriteTask(VerificationEvent @event)
 {
     Ensure.NotNull(@event, "event");
     _event = @event;
 }
Exemple #8
0
 public WriteTask(VerificationEvent @event)
 {
     Ensure.NotNull(@event, "event");
     _event = @event;
 }
Exemple #9
0
 public bool TryGetEventToVerify(out VerificationEvent evnt)
 {
     return(_eventsForVerification.TryDequeue(out evnt));
 }
Exemple #10
0
 public bool TryGetEventToWrite(out VerificationEvent evnt)
 {
     return(_eventsForWriting.TryDequeue(out evnt));
 }