예제 #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);