code: public void onChangeMode(IndexerIoMode mode)
     {
        try
        {
           if (mode == IndexerIoMode.READ_WRITE)
           {
              // reprocess any notfinished notifies;
              log.info("Processing error log ...");
              recoverErrorLog(errorLog);
           }
        }
        catch (IOException e)
        {
           log.error("Can not recover error log. On changed mode " + mode, e);
        }
        catch (RepositoryException e)
        {
           log.error("Can not recover error log.", e);
        }
     }
docs: {@inheritDoc}