void flushToDisk() {
      try {
        ByteBuffer buffer = result.get();
        writeChannel.write(buffer, offset);
        result = null;
        activeSegments.release();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        throwFatalException(e);
      } catch (IOException e) {
        throw new UncheckedIOException(e);
      } catch (ExecutionException e) {
        throwFatalException(e);
      }
    }
A segment of the storage file that threads can update in parallel, and can be flushed to disk when all threads are
done writing to it.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ArrayLongLongMapMmap.java