class BatchingReadPipe implements ReadPipe<List<T>> {

  @Override
  public void drainTo(final Collection<List<T>> output, final int maxElements) {
    final List<T> nextBatch = poll();
    if (nextBatch != null) {
      output.add(nextBatch);
    }
  }

  public  BatchingReadPipe(
      final ReadPipe<T> input, final int maximumBatchSize, final Counter batchCounter);

}