public void addKeyAndVersion(Object key, VersionTag versionTag) {
    if (logger.isTraceEnabled(LogMarker.VERSIONED_OBJECT_LIST_VERBOSE)) {
      logger.trace(LogMarker.VERSIONED_OBJECT_LIST_VERBOSE,
          "VersionedObjectList.addKeyAndVersion({}; {})", key, versionTag);
    }
    if (objects.size() > 0) {
      throw new IllegalStateException("attempt to add key/version to a list containing objects");
    }
    keys.add(key);
    if (regionIsVersioned) {
      // Assert.assertTrue(versionTag != null);
      versionTags.add(versionTag);
    }
  }
add a new entry to the list

@param key the entry's key
@param versionTag the version tag for the entry, or null if there is no version information
       available
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/VersionedObjectList.java