public Set<Node> getListCopy() {
    final List<Node> l;
    synchronized (this) {
      l = list;
    }
    return new HashSet<>(l);
  }
Returns a copy of the arraylist contained.
geode-core/src/main/java/org/apache/geode/internal/util/VersionedArrayList.java