public static void appendNewRegisterInterestResponseChunk(final @NotNull LocalRegion region,
      final @NotNull VersionedObjectList values, final @NotNull Object riKeys,
      final @NotNull Set<Map.Entry<?, ?>> set,
      final @NotNull ServerConnection servConn)
      throws IOException {
    for (Entry<?, ?> entry : set) {
      if (entry instanceof Region.Entry) { // local entries
        VersionTag<?> vt;
        Object key;
        Object value;
        if (entry instanceof EntrySnapshot) {
          vt = ((EntrySnapshot) entry).getVersionTag();
          key = ((EntrySnapshot) entry).getRegionEntry().getKey();
          value = ((EntrySnapshot) entry).getRegionEntry().getValue(null);
          updateValues(values, key, value, vt);
        } else {
          VersionStamp<?> vs = ((NonTXEntry) entry).getRegionEntry().getVersionStamp();
          vt = vs == null ? null : vs.asVersionTag();
          key = entry.getKey();
          value = ((NonTXEntry) entry).getRegionEntry().getValueRetain(region, true);
          try {
            updateValues(values, key, value, vt);
          } finally {
            OffHeapHelper.release(value);
          }
        }
      } else { // Map.Entry (remote entries)
        List<?> list = (List<?>) entry.getValue();
        Object value = list.get(0);
        VersionTag<?> tag = (VersionTag<?>) list.get(1);
        updateValues(values, entry.getKey(), value, tag);
      }
      if (values.size() == MAXIMUM_CHUNK_SIZE) {
        // Send the chunk and clear the list
        sendNewRegisterInterestResponseChunk(region, riKeys, values,
            false, servConn);
        values.clear();
      }
    }
  }
Copied from Get70.getValueAndIsObject(), except a minor change. (Make the method static instead
of copying it here?)
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java