private static void handleListPR(final @NotNull PartitionedRegion region,
      final @NotNull List<?> keyList,
      final @NotNull InterestResultPolicy policy, final @NotNull ServerConnection servConn)
      throws IOException {
    int chunkSize = min(keyList.size(), MAXIMUM_CHUNK_SIZE);
    final List<Object> newKeyList = new ArrayList<>(chunkSize);
    region.getKeysWithList(keyList, sendTombstonesInRIResults(policy),
        theSet -> appendInterestResponseKeys(region, keyList, uncheckedCast(theSet), newKeyList,
            servConn));
    // Send the last chunk (the only chunk for individual and list keys)
    // always send it back, even if the list is of zero size.
    sendRegisterInterestResponseChunk(region, keyList, newKeyList, true, servConn);
  }
Process an interest request involving a list of keys
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java