code: public static WriteOptions buildWriteOptions(boolean sync, boolean disableWAL) {
          WriteOptions writeOptions = new WriteOptions();
          writeOptions.setSync(sync).setDisableWAL(disableWAL);
          return writeOptions;
      }
docs: Builds RocksDb {@link WriteOptions}.
  
  @param sync
  As of RocksDB v3.10.1, no data lost if process crashes even if sync==false. Data
  lost only when server/OS crashes. So it's relatively safe to set sync=false for
  fast write
  @param disableWAL
  @return