code: private void resetStoreDefinitions(Set<String> storeNamesToDelete) {
          // Clear entries in the metadata cache
          for(String storeName: storeNamesToDelete) {
              this.metadataCache.remove(storeName);
              this.storeDefinitionsStorageEngine.delete(storeName, null);
              this.storeNames.remove(storeName);
          }
      }
docs: Function to clear all the metadata related to the given store
  definitions. This is needed when a put on 'stores.xml' is called, thus
  replacing the existing state.
  
  This method is not thread safe. It is expected that the caller of this
  method will handle concurrency related issues.
  
  @param storeNamesToDelete