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