public void registerClientInterest(final @NotNull String regionName,
      final @NotNull Object keyOfInterest,
      final @NotNull ClientProxyMembershipID membershipID,
      final @NotNull InterestType interestType,
      final boolean isDurable,
      final boolean sendUpdatesAsInvalidates,
      final boolean manageEmptyRegions,
      final @NotNull DataPolicy regionDataPolicy,
      final boolean flushState)
      throws IOException, RegionDestroyedException {

    CacheClientProxy proxy = getClientProxy(membershipID, true);

    if (logger.isDebugEnabled()) {
      logger.debug(
          "CacheClientNotifier: Client {} registering interest in: {} -> {} (an instance of {})",
          proxy, regionName, keyOfInterest, keyOfInterest.getClass().getName());
    }

    if (proxy == null) {
      // client should see this and initiates failover
      throw new IOException(
          "CacheClientProxy for this client is no longer on the server , so registerInterest operation is unsuccessful");
    }

    boolean done = false;
    try {
      proxy.registerClientInterest(regionName, keyOfInterest, interestType, isDurable,
          sendUpdatesAsInvalidates, flushState);

      if (manageEmptyRegions) {
        updateMapOfEmptyRegions(proxy.getRegionsWithEmptyDataPolicy(), regionName,
            regionDataPolicy);
      }

      done = true;
    } finally {
      if (!done) {
        proxy.unregisterClientInterest(regionName, keyOfInterest, interestType, false);
      }
    }
  }
Registers client interest in the input region and key.

@param regionName The name of the region of interest
@param keyOfInterest The name of the key of interest
@param membershipID clients ID
@param interestType type of registration
@param isDurable whether the registration persists when client goes away
@param sendUpdatesAsInvalidates client wants invalidation messages
@param manageEmptyRegions whether to book keep empty region information
@param regionDataPolicy region data policy
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java