@Override
  public boolean add(T e) {
    synchronized (this) {
      Set<T> set = new HashSet<>(snapshot);
      boolean result = set.add(e);
      snapshot = set;
      return result;
    }
  }
Create a custom {@link Iterator} implementation for the {@link CopyOnWriteHashSet}
geode-core/src/main/java/org/apache/geode/internal/CopyOnWriteHashSet.java