Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
 protected override bool _Push(OrderedCommand data)
 {
     this._buffer.Add(data);
     return(true);
 }
Ejemplo n.º 3
0
 public bool Pop(OrderedCommand data)
 {
     this._metrics_total_pop++;
     Console.WriteLine($"POP:  {data}");
     return(true);
 }
Ejemplo n.º 4
0
 public bool Drop(OrderedCommand data, string reason)
 {
     this._metrics_total_drop++;
     Console.WriteLine($"DROP: {data} ({reason})");
     return(true);
 }
Ejemplo n.º 5
0
 protected abstract bool _Push(OrderedCommand data);