private void handleInterestEvent(String regionName, Set keysOfInterest, int interestType, boolean isRegister) { // Notify the region about this register interest event if: // - the application has requested it // - this is a primary CacheClientProxy (otherwise multiple notifications // may occur) // - it is a key interest type (regex is currently not supported) InterestRegistrationEvent event = null; if (NOTIFY_REGION_ON_INTEREST && this.ccp.isPrimary() && interestType == InterestType.KEY) { event = new InterestRegistrationEventImpl(this.ccp, regionName, keysOfInterest, interestType, isRegister); try { notifyRegionOfInterest(event); } catch (Exception e) { logger.warn(LocalizedStrings.CacheClientProxy_REGION_NOTIFICATION_OF_INTEREST_FAILED, e); } } // Invoke interest registration listeners if (containsInterestRegistrationListeners()) { if (event == null) { event = new InterestRegistrationEventImpl(this.ccp, regionName, keysOfInterest, interestType, isRegister); } notifyInterestRegistrationListeners(event); } }
private void handleInterestEvent(String regionName, Set keysOfInterest, int interestType, boolean isRegister) { // Notify the region about this register interest event if: // - the application has requested it // - this is a primary CacheClientProxy (otherwise multiple notifications // may occur) // - it is a key interest type (regex is currently not supported) InterestRegistrationEvent event = null; if (NOTIFY_REGION_ON_INTEREST && this.ccp.isPrimary() && interestType == InterestType.KEY) { event = new InterestRegistrationEventImpl(this.ccp, regionName, keysOfInterest, interestType, isRegister); try { notifyRegionOfInterest(event); } catch (Exception e) { this._logger.warning(LocalizedStrings. CacheClientProxy_REGION_NOTIFICATION_OF_INTEREST_FAILED, e); } } // Invoke interest registration listeners if (containsInterestRegistrationListeners()) { if (event == null) { event = new InterestRegistrationEventImpl(this.ccp, regionName, keysOfInterest, interestType, isRegister); } notifyInterestRegistrationListeners(event); } }