Beispiel #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());
            }
        }
Beispiel #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();
            }
        }
Beispiel #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();
        }
Beispiel #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());
            }
        }
Beispiel #5
0
 public bool TryGetEventToVerify(out VerificationEvent evnt)
 {
     return _eventsForVerification.TryDequeue(out evnt);
 }
Beispiel #6
0
 public bool TryGetEventToWrite(out VerificationEvent evnt)
 {
     return _eventsForWriting.TryDequeue(out evnt);
 }
Beispiel #7
0
 public WriteTask(VerificationEvent @event)
 {
     Ensure.NotNull(@event, "event");
     _event = @event;
 }
Beispiel #8
0
 public WriteTask(VerificationEvent @event)
 {
     Ensure.NotNull(@event, "event");
     _event = @event;
 }
Beispiel #9
0
 public bool TryGetEventToVerify(out VerificationEvent evnt)
 {
     return(_eventsForVerification.TryDequeue(out evnt));
 }
Beispiel #10
0
 public bool TryGetEventToWrite(out VerificationEvent evnt)
 {
     return(_eventsForWriting.TryDequeue(out evnt));
 }