class TransientQueryQueue implements BlockingRowQueue {

  public void acceptRow(final GenericRow row) {
    try {
      if (row == null) {
        return;
      }

      if (!callback.shouldQueue()) {
        return;
      }

      while (!closed) {
        if (rowQueue.offer(row, offerTimeoutMs, TimeUnit.MILLISECONDS)) {
          callback.onQueued();
          break;
        }
      }
    } catch (final InterruptedException e) {
      // Forced shutdown?
      Thread.currentThread().interrupt();
    }
  }

  public  TransientQueryQueue(final OptionalInt limit);
  @VisibleForTesting  TransientQueryQueue(
      final OptionalInt limit,
      final int queueSizeLimit,
      final int offerTimeoutMs
  );

}