Пример #1
0
        public bool Push(OrderedCommand data)
        {
            this._metrics_total_push++;

            int current_buffer_size = this._metrics_total_push - this._metrics_total_pop - this._metrics_total_drop;

            this._metrics_buffer_max = Math.Max(current_buffer_size, this._metrics_buffer_max);

            return(this._Push(data));
        }
Пример #2
0
 protected override bool _Push(OrderedCommand data)
 {
     this._buffer.Add(data);
     return(true);
 }
Пример #3
0
 public bool Pop(OrderedCommand data)
 {
     this._metrics_total_pop++;
     Console.WriteLine($"POP:  {data}");
     return(true);
 }
Пример #4
0
 public bool Drop(OrderedCommand data, string reason)
 {
     this._metrics_total_drop++;
     Console.WriteLine($"DROP: {data} ({reason})");
     return(true);
 }
Пример #5
0
 protected abstract bool _Push(OrderedCommand data);