code: public void sync(final boolean force) {
      if (closed) {
        throw new AlreadyClosedException();
      }
      final int f = force ? 1 : 0;
      checkRc(LIB.mdb_env_sync(ptr, f));
    }
docs: Flushes the data buffers to disk.
  
  @param force force a synchronous flush (otherwise if the environment has
  the MDB_NOSYNC flag set the flushes will be omitted, and with
  MDB_MAPASYNC they will be asynchronous)