class HashTableAllocationTracker {

  public int getNextBatchHolderSize(int batchSize) {
    state = State.ALLOCATION_IN_PROGRESS;

    if (!config.getInitialSizeIsFinal()) {
      // We don't know the final size of the hash table, so just return the batch size.
      return batchSize;
    } else {
      // We know the final size of the hash table so we need to compute the next batch holder size.
      Preconditions.checkState(remainingCapacity > 0);
      return computeNextBatchHolderSize(batchSize);
    }
  }

  protected  HashTableAllocationTracker(final HashTableConfig config);

}