code: @Override
    protected void flushAndSync(boolean durable) throws IOException {
      if (outputStream == null) {
        throw new IOException("Trying to use aborted output stream!");
      }
      if (doubleBuf.isFlushed()) {
        return;
      }
      // Under the covers, this invokes a method that does not return until
      // we have successfully persisted the buffer to a quorum of bookies.
      doubleBuf.flushTo(outputStream);
    }
docs: Flush the contents of the "ready" buffer to a durable BookKeeper ledger
  BookKeeper ledger. After this method returns, we are guaranteed to
  have persisted the log records stored in the ready buffer to a quorum
  of bookies that store the underlying ledger.