@Override
  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
    final ArrayList<Node> l = new ArrayList<>();
    final long v = in.readLong();
    final int size = in.readInt();
    for (int k = 0; k < size; k++) {
      l.add(new Node(in));
    }

    // final ArrayList vh = new ArrayList();
    // final int vhsize = in.readInt();
    // for (int k = 0; k < vhsize; k++) {
    // vh.add(in.readUTF());
    // }

    synchronized (this) {
      version = v;
      list = Collections.unmodifiableList(l);
      // this.vhist = Collections.unmodifiableList(vh);
    }
  }
Prints the version and elements of the list.

@return String with version and elements of the list.
geode-core/src/main/java/org/apache/geode/internal/util/VersionedArrayList.java