class BoundedQueue extends LinkedBlockingDeque<Runnable> {

  @Override
  public boolean offer(final Runnable task) {
    while (!super.offer(task)) {
      remove();
      totalEvictedTaskCounter.inc();
    }
    return true;
  }

  public  BoundedQueue(
      final int capacity, final String metricName, final MetricsSystem metricsSystem);

}