code: private void swapROStores(List<String> swappedStoreNames, boolean useSwappedStoreNames) {
  
          try {
              for(StoreDefinition storeDef: metadataStore.getStoreDefList()) {
  
                  // Only pick up the RO stores
                  if(storeDef.getType().compareTo(ReadOnlyStorageConfiguration.TYPE_NAME) == 0) {
  
                      if(useSwappedStoreNames && !swappedStoreNames.contains(storeDef.getName())) {
                          continue;
                      }
  
                      ReadOnlyStorageEngine engine = (ReadOnlyStorageEngine) storeRepository.getStorageEngine(storeDef.getName());
  
                      if(engine == null) {
                          throw new VoldemortException("Could not find storage engine for "
                                                       + storeDef.getName() + " to swap ");
                      }
  
                      logger.info("Swapping RO store " + storeDef.getName());
  
                      // Time to swap this store - Could have used admin client,
                      // but why incur the overhead?
                      engine.swapFiles(engine.getCurrentDirPath());
  
                      // Add to list of stores already swapped
                      if(!useSwappedStoreNames)
                          swappedStoreNames.add(storeDef.getName());
                  }
              }
          } catch(Exception e) {
              logger.error("Error while swapping RO store");
              throw new VoldemortException(e);
          }
      }
docs: Goes through all the RO Stores in the plan and swaps it
  
  @param swappedStoreNames Names of stores already swapped
  @param useSwappedStoreNames Swap only the previously swapped stores (
  Happens during error )