code: public void updateImpl(List<Metric> metrics) {
      long now = System.currentTimeMillis();
      TimestampedUpdate update = new TimestampedUpdate(now, metrics);
  
      boolean result = updateQueue.offer(update);
      final int maxAttempts = 5;
      int attempts = 0;
      while (!result && attempts < maxAttempts) {
        updateQueue.remove();
        result = updateQueue.offer(update);
        ++attempts;
      }
  
      if (!result) {
        incrementFailedCount();
      }
    }
docs: {@inheritDoc}