protected static void fillAndSendRegisterInterestResponseChunks(
      final @Nullable LocalRegion region,
      final @NotNull Object riKey, final @NotNull InterestType interestType,
      final boolean serializeValues,
      final @NotNull InterestResultPolicy policy, final @NotNull ServerConnection servConn)
      throws IOException {
    // Client is not interested.
    if (policy.isNone()) {
      sendRegisterInterestResponseChunk(region, riKey, new ArrayList<>(), true, servConn);
      return;
    }
    if (policy.isKeysValues()) {
      handleKeysValuesPolicy(region, riKey, interestType, serializeValues, servConn);
      return;
    }
    if (riKey instanceof List) {
      handleList(region, (List<?>) riKey, policy, servConn);
      return;
    }
    if (!(riKey instanceof String)) {
      handleSingleton(region, riKey, policy, servConn);
      return;
    }

    switch (interestType) {
      case OQL_QUERY:
        // Not supported yet
        throw new InternalGemFireError(
            "not yet supported");

      case FILTER_CLASS:
        throw new InternalGemFireError(
            "not yet supported");

      case REGULAR_EXPRESSION:
        String regEx = (String) riKey;
        if (regEx.equals(".*")) {
          handleAllKeys(region, policy, servConn);
        } else {
          handleRegEx(region, regEx, policy, servConn);
        }
        break;

      case KEY:
        if (riKey.equals("ALL_KEYS")) {
          handleAllKeys(region, policy, servConn);
        } else {
          handleSingleton(region, riKey, policy, servConn);
        }
        break;

      default:
        throw new InternalGemFireError(
            "unknown interest type");
    }
  }
If an operation is retried then some server may have seen it already. We cannot apply this
operation to the cache without knowing whether a version tag has already been created for it.
Otherwise caches that have seen the event already will reject it but others will not, but will
have no version tag with which to perform concurrency checks.
<p>
The client event should have the event identifier from the client and the region affected by
the operation.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java