code: @Override
    public void setReadyToFlush() throws IOException {
      doubleBuf.getCurrentBuf().write(FSEditLogOpCodes.OP_INVALID.getOpCode()); // insert eof marker
      doubleBuf.setReadyToFlush();
    }
docs: All data that has been written to the stream so far will be flushed. New
  data can be still written to the stream while flushing is performed.