/** * Constructor. * * @param regionName The name of the region to which this interest event belongs */ public InterestRegistrationEventImpl(CacheClientProxy clientSession, String regionName, Set keysOfInterest, int interestType, boolean isRegister) { this.cache = clientSession.getCache(); this.clientSession = clientSession; this.regionName = regionName; this.keysOfInterest = keysOfInterest; this.interestType = interestType; this.isRegister = isRegister; }
private InternalCache getCache() { return getProxy().getCache(); }
private void closeNonDurableCqs() { CqService cqService = getCache().getCqService(); if (cqService != null) { try { cqService.closeNonDurableClientCqs(getProxyID()); } catch (CqException ex) { logger.warn("CqException while closing non durable Cqs. {}", ex.getLocalizedMessage()); } } }
private void closeAllClientCqs(CacheClientProxy proxy) { CqService cqService = proxy.getCache().getCqService(); if (cqService != null) { final boolean isDebugEnabled = logger.isDebugEnabled(); // LocalizedMessage.create( try { if (isDebugEnabled) { logger.debug("CacheClientNotifier: Closing client CQs: {}", proxy); } cqService.closeClientCqs(proxy.getProxyID()); } catch (CqException e1) { logger.warn("Unable to close CQs for the client: {}", proxy.getProxyID()); if (isDebugEnabled) { e1.printStackTrace(); } } } }
private void enqueueInterestRegistrationMessage(ClientInterestMessageImpl message) { // Enqueue the interest registration message for the client. // If the client is not 7.0.1 or greater and the key of interest is a list, // then create an individual message for each entry in the list since the // client doesn't support a ClientInterestMessageImpl containing a list. if (Version.GFE_701.compareTo(this.clientVersion) > 0 && message.getKeyOfInterest() instanceof List) { for (Iterator i = ((List) message.getKeyOfInterest()).iterator(); i.hasNext();) { this._messageDispatcher.enqueueMessage( new ClientInterestMessageImpl(getCache().getDistributedSystem(), message, i.next())); } } else { this._messageDispatcher.enqueueMessage(message); } }
protected void clearClientInterestList() { boolean isClosed = ccp.getCache().isClosed(); synchronized (this.interestListLock) { for (String regionName : regions) { FilterProfile p = getProfile(regionName); if (p == null) { continue; } if (!isClosed) { if (p.hasAllKeysInterestFor(id)) { Set allKeys = new HashSet(); allKeys.add(".*"); allKeys = Collections.unmodifiableSet(allKeys); handleInterestEvent(regionName, allKeys, InterestType.REGULAR_EXPRESSION, false); } Set keysOfInterest = p.getKeysOfInterestFor(id); if (keysOfInterest != null && keysOfInterest.size() > 0) { handleInterestEvent(regionName, keysOfInterest, InterestType.KEY, false); } Map<String, Pattern> patternsOfInterest = p.getPatternsOfInterestFor(id); if (patternsOfInterest != null && patternsOfInterest.size() > 0) { handleInterestEvent(regionName, patternsOfInterest.keySet(), InterestType.REGULAR_EXPRESSION, false); } } p.clearInterestFor(id); } regions.clear(); } }
CqService cqService = ccp.getCache().getCqService(); if (cqService == null || !cqService.isRunning()) { results.add(new CliFunctionResult(memberNameOrId, CliFunctionResult.StatusState.ERROR,
CqService cqService = getCache().getCqService(); if (cqService != null) { InternalCqQuery cqToClose =
CqService cqService = cacheClientProxy.getCache().getCqService(); if (cqService == null) { return new CliFunctionResult(memberNameOrId, CliFunctionResult.StatusState.ERROR,
this.versionTag.setCanonicalIDs(proxy.getCache().getDistributionManager());