code: void recover() {
      final List<NamespaceSynchronizationConfig> nsConfigs = new ArrayList<>();
      for (final MongoNamespace ns : this.syncConfig.getSynchronizedNamespaces()) {
        nsConfigs.add(this.syncConfig.getNamespaceConfig(ns));
      }
  
      for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
        nsConfig.getLock().writeLock().lock();
      }
      try {
        for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
          nsConfig.getLock().writeLock().lock();
          try {
            recoverNamespace(nsConfig);
          } finally {
            nsConfig.getLock().writeLock().unlock();
          }
        }
      } finally {
        for (final NamespaceSynchronizationConfig nsConfig : nsConfigs) {
          nsConfig.getLock().writeLock().unlock();
        }
      }
    }
docs: Recovers the state of synchronization in case a system failure happened. The goal is to revert
  to a known, good state.