/** * Registers interest in the input region name and list of keys * * @param regionName The fully-qualified name of the region in which to register interest * @param keysOfInterest The list of keys in which to register interest */ protected void registerClientInterestList(String regionName, List keysOfInterest, boolean isDurable, boolean sendUpdatesAsInvalidates, boolean flushState) { // we only use two interest lists to map the non-durable and durable // identifiers to their interest settings ClientInterestList cil = this.cils[RegisterInterestTracker.getInterestLookupIndex(isDurable, false/* sendUpdatesAsInvalidates */)]; cil.registerClientInterestList(regionName, keysOfInterest, sendUpdatesAsInvalidates); if (getHARegionQueue() != null) { if (flushState) { flushForInterestRegistration(regionName, this._cache.getDistributedSystem().getDistributedMember()); } getHARegionQueue().setHasRegisteredInterest(true); } }
private void denyListSlowReceiver(CacheClientProxy clientProxy) { final CacheClientProxy proxy = clientProxy; if ((proxy.getHARegionQueue() != null && proxy.getHARegionQueue().isClientSlowReceiver()) && !denyListedClients.contains(proxy.getProxyID())) {
/** * Adds or updates entry in the dispatched message map when client sends an ack. * */ public boolean processDispatchedMessage(ClientProxyMembershipID proxyId, EventID eid) { boolean success = false; CacheClientProxy proxy = getClientProxy(proxyId); if (proxy != null) { HARegionQueue harq = proxy.getHARegionQueue(); harq.addDispatchedMessage(new ThreadIdentifier(eid.getMembershipID(), eid.getThreadID()), eid.getSequenceID()); success = true; } return success; }
/** * Registers interest in the input region name and key * * @param regionName The fully-qualified name of the region in which to register interest * @param keyOfInterest The key in which to register interest */ protected void registerClientInterest(String regionName, Object keyOfInterest, int interestType, boolean isDurable, boolean sendUpdatesAsInvalidates, boolean flushState) { ClientInterestList cil = this.cils[RegisterInterestTracker.getInterestLookupIndex(isDurable, false)]; cil.registerClientInterest(regionName, keyOfInterest, interestType, sendUpdatesAsInvalidates); if (flushState) { flushForInterestRegistration(regionName, this._cache.getDistributedSystem().getDistributedMember()); } HARegionQueue queue = getHARegionQueue(); if (queue != null) { // queue is null during initialization queue.setHasRegisteredInterest(true); } }
CacheClientProxy proxy = ccn.getClientProxy(serverConnection.getProxyID()); if (proxy != null) { proxy.getHARegionQueue().createAckedEventsMap(); for (int i = 0; i < numEvents; i++) { Part eventIdPart = clientMessage.getPart(i); proxy.getHARegionQueue().setAckedEvents(); writeReply(clientMessage, serverConnection); serverConnection.setAsTrue(RESPONDED);
@Override public void run() { CacheDistributionAdvisor advisor = ((DistributedRegion) proxy.getHARegionQueue().getRegion()) .getCacheDistributionAdvisor(); Set members = advisor.adviseCacheOp(); // Send client denylist message ClientDenylistProcessor.sendDenylistedClient(proxy.getProxyID(), dm, members); // close the proxy for slow receiver. proxy.close(false, false); removeClientProxy(proxy); if (PoolImpl.AFTER_QUEUE_DESTROY_MESSAGE_FLAG) { ClientServerObserver bo = ClientServerObserverHolder.getInstance(); bo.afterQueueDestroyMessage(); } // send remove from denylist. RemoveClientFromDenylistMessage rcm = new RemoveClientFromDenylistMessage(); rcm.setProxyID(proxy.getProxyID()); dm.putOutgoing(rcm); denyListedClients.remove(proxy.getProxyID()); } });
private ClientQueueDetail getClientQueueDetail(CacheClientProxy p) { ClientQueueDetail queueDetail = new ClientQueueDetail(); ClientProxyMembershipID proxyID = p.getProxyID(); if (!p.isConnected() && !proxyID.isDurable()) { return null; } queueDetail.setClientId(getClientIdFromCacheClientProxy(p)); HARegionQueue queue = p.getHARegionQueue(); if (queue == null) { return queueDetail; } queueDetail.setQueueSize(p.getQueueSizeStat()); queueDetail.setEventsConflated(queue.getStatistics().getEventsConflated()); queueDetail.setEventsEnqued(queue.getStatistics().getEventsEnqued()); queueDetail.setEventsExpired(queue.getStatistics().getEventsExpired()); queueDetail.setEventsRemoved(queue.getStatistics().getEventsRemoved()); queueDetail.setEventsRemovedByQrm(queue.getStatistics().getEventsRemovedByQrm()); queueDetail.setEventsTaken(queue.getStatistics().getEventsTaken()); queueDetail.setMarkerEventsConflated(queue.getStatistics().getMarkerEventsConflated()); queueDetail.setNumVoidRemovals(queue.getStatistics().getNumVoidRemovals()); return queueDetail; }