public void accept(T item, int cost) {
    if (writeBatch == null) {
      writeBatch = new ArrayDeque<>(writeLimit / 2);
    }

    writeCost += cost;
    writeBatch.offer(item);

    if (writeCost >= writeLimit) {
      flushWrites();
    }
  }
Creates a new {@code WeightedHandoffQueue} with {@code outer} maximum number of pending batches and {@code inner}
maximum batch weight.
planetiler-core/src/main/java/com/onthegomap/planetiler/worker/WeightedHandoffQueue.java