@Override
  public void toData(DataOutput out) throws IOException {
    long v = -1;
    final List<Node> l;
    // final List vh;
    synchronized (this) {
      v = version;
      l = list;
      // vh = this.vhist;
    }

    out.writeLong(v);
    final int s = l.size();
    out.writeInt(s);
    for (Node node : l) {
      InternalDataSerializer.invokeToData(node, out);
    }

    // final int sh = vh.size();
    // out.writeInt(sh);
    // for (int k = 0; k < sh; k++) {
    // out.writeUTF((String) vh.get(k));
    // }
  }
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