public synchronized boolean remove(Node obj) {
    ArrayList<Node> newList = new ArrayList<>(list);
    boolean ret = newList.remove(obj);
    if (ret) {
      list = Collections.unmodifiableList(newList);
      // incrementVersion("r->" + obj);
      incrementVersion();
    }
    return ret;
  }
Removes obj from the list. Removal is done by making a copy of the existing list and then
removing the obj from the new list. If the object was removed, the list is assigning to the new
unmodifiable list. This is to ensure that the iterator of the list doesn't get
ConcurrentModificationException.

@return true if the element was removed and the version was changed, otherwise version and list
        are left unmodified.

@see java.util.ConcurrentModificationException
@param obj the object to remove from the list
geode-core/src/main/java/org/apache/geode/internal/util/VersionedArrayList.java