code: public synchronized void setMode(IndexerIoMode mode)
     {
        if (this.mode != mode)
        {
           log.info("Indexer io mode=" + mode);
           this.mode = mode;
           for (IndexerIoModeListener listener : listeners)
           {
              listener.onChangeMode(mode);
           }
        }
     }
docs: Changes the current mode of the indexer. If the value has changes all the listeners
  will be notified