code: protected void setReadOnly()
     {
        // try to stop merger in safe way
        if (merger != null)
        {
           merger.dispose();
           merger = null;
        }
  
        if (flushTask != null)
        {
           flushTask.cancel();
        }
        FLUSH_TIMER.purge();
        this.redoLog = null;
     }
docs: Sets mode to READ_ONLY, discarding flush task