/** * Unregisters 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 isClosing Whether the caller is closing * @param membershipID The <code>ClientProxyMembershipID</code> of the client no longer interested * in this <code>Region</code> and key */ public void unregisterClientInterest(String regionName, Object keyOfInterest, int interestType, boolean isClosing, ClientProxyMembershipID membershipID, boolean keepalive) { if (logger.isDebugEnabled()) { logger.debug( "CacheClientNotifier: Client {} unregistering interest in: {} -> {} (an instance of {})", membershipID, regionName, keyOfInterest, keyOfInterest.getClass().getName()); } CacheClientProxy proxy = getClientProxy(membershipID); if (proxy != null) { proxy.setKeepAlive(keepalive); proxy.unregisterClientInterest(regionName, keyOfInterest, interestType, isClosing); } }
/** * Unregisters client interest in the input region and list of keys. * * @param regionName The name of the region of interest * @param keysOfInterest The list of keys of interest * @param isClosing Whether the caller is closing * @param membershipID The <code>ClientProxyMembershipID</code> of the client no longer interested * in this <code>Region</code> and key */ public void unregisterClientInterest(String regionName, List keysOfInterest, boolean isClosing, ClientProxyMembershipID membershipID, boolean keepalive) { if (logger.isDebugEnabled()) { logger.debug("CacheClientNotifier: Client {} unregistering interest in: {} -> {}", membershipID, regionName, keysOfInterest); } CacheClientProxy proxy = getClientProxy(membershipID); if (proxy != null) { proxy.setKeepAlive(keepalive); proxy.unregisterClientInterest(regionName, keysOfInterest, isClosing); } }
} finally { if (!done) { proxy.unregisterClientInterest(regionName, keyOfInterest, interestType, false);
private void notifySecondariesAndClient(String regionName, Object keyOfInterest, boolean isDurable, boolean receiveValues, int interestType) { // Notify all secondary proxies of a change in interest ClientInterestMessageImpl message = new ClientInterestMessageImpl( new EventID(this._cache.getDistributedSystem()), regionName, keyOfInterest, interestType, (byte) 0, isDurable, !receiveValues, ClientInterestMessageImpl.UNREGISTER); notifySecondariesOfInterestChange(message); // Modify interest registration if (keyOfInterest instanceof List) { unregisterClientInterest(regionName, (List) keyOfInterest, false); } else { unregisterClientInterest(regionName, keyOfInterest, interestType, false); } // Enqueue the interest unregistration message for the client. enqueueInterestRegistrationMessage(message); }
unregisterClientInterest(regionName, (List) key, false); } else { unregisterClientInterest(regionName, key, interestType, false);