protected void registerClientInterest(final @NotNull String regionName,
      final @NotNull Object keyOfInterest, final @NotNull InterestType interestType,
      final boolean sendUpdatesAsInvalidates) {
    if (logger.isDebugEnabled()) {
      logger.debug("{}: registerClientInterest region={} key={}", cacheClientProxy, regionName,
          keyOfInterest);
    }
    final Set<?> keysRegistered;
    synchronized (interestListLock) {
      LocalRegion r = (LocalRegion) cacheClientProxy._cache.getRegion(regionName, true);
      if (r == null) {
        throw new RegionDestroyedException("Region could not be found for interest registration",
            regionName);
      }
      if (!(r instanceof CacheDistributionAdvisee)) {
        throw new IllegalArgumentException("region " + regionName
            + " is not distributed and does not support interest registration");
      }
      FilterProfile p = r.getFilterProfile();
      keysRegistered =
          p.registerClientInterest(id, keyOfInterest, interestType, sendUpdatesAsInvalidates);
      regions.add(regionName);
    }
    // Perform actions if any keys were registered
    if ((keysRegistered != null) && containsInterestRegistrationListeners()
        && !keysRegistered.isEmpty()) {
      handleInterestEvent(regionName, keysRegistered, interestType, true);
    }
  }
Registers interest in the input region name and key
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientInterestList.java