void write(T item) {
      count++;
      batch.add(item);
      if (batch.size() >= batchLimit) {
        flush(batchStatement);
      }
    }
Queue-up a write or flush to disk if enough are waiting.
planetiler-core/src/main/java/com/onthegomap/planetiler/mbtiles/Mbtiles.java