public void removeOldMembers(Set<VersionSource<T>> idsToKeep) {
    synchronized (memberToVersion) {
      for (Iterator<Map.Entry<T, RegionVersionHolder<T>>> it =
          memberToVersion.entrySet().iterator(); it.hasNext();) {
        Map.Entry<T, RegionVersionHolder<T>> entry = it.next();
        if (entry.getValue().isDepartedMember) {
          if (!idsToKeep.contains(entry.getKey())) {
            it.remove();
            memberToGCVersion.remove(entry.getKey());
            synchronized (canonicalIdLock) {
              canonicalIds.remove(entry.getKey());
            }
          }
        }
      }
    }
  }
Removes departed members not in the given collection of IDs from the version vector

@param idsToKeep collection of the kind of IDs appropriate for this vector
geode-core/src/main/java/org/apache/geode/internal/cache/versions/RegionVersionVector.java