code: @Override
    public void close() {
      assertIsOpen();
      flush();
      compactor.close();
      segments.close();
      open = false;
    }
docs: Closes the log.
  
  @throws IllegalStateException If the log is not open.