private boolean isEventUserVisible(CacheEvent ce) { return BucketRegion.FORCE_LOCAL_LISTENERS_INVOCATION || !(ce.getRegion() instanceof PartitionedRegion); }
@Override public void dispatchEvent(CacheEvent event, CacheListener listener) { listener.afterRegionDestroy((RegionEvent) event); // only now is the right time to call close() on the listener ((LocalRegion) event.getRegion()).closeCacheCallback(listener); }
public FilterRoutingInfo adviseFilterRouting(CacheEvent event, Set cacheOpRecipients) { FilterProfile fp = ((LocalRegion) event.getRegion()).getFilterProfile(); if (fp != null) { return fp.getFilterRoutingInfoPart1(event, this.profiles, cacheOpRecipients); } return null; }
/** * Do all operations touch internal regions? Returns false if the transaction is empty or if any * events touch non-internal regions. */ public boolean hasOnlyInternalEvents() { if (events == null || events.isEmpty()) { return false; } Iterator<CacheEvent<?, ?>> it = this.events.iterator(); while (it.hasNext()) { CacheEvent<?, ?> event = it.next(); if (isEventUserVisible(event)) { LocalRegion region = (LocalRegion) event.getRegion(); if (region != null && !region.isPdxTypesRegion() && !region.isInternalRegion()) { return false; } } } return true; }
/** * Do all operations touch internal regions? Returns false if the transaction is empty or if any * events touch non-internal regions. */ public boolean hasOnlyInternalEvents() { List<CacheEvent<?, ?>> txevents = getEvents(); if (txevents == null || txevents.isEmpty()) { return false; } for (CacheEvent<?, ?> txevent : txevents) { LocalRegion region = (LocalRegion) txevent.getRegion(); if (region != null && !region.isPdxTypesRegion() && !region.isInternalRegion()) { return false; } } return true; }
/** * get continuous query routing information * * @param event the event to process * @param peerProfiles the profiles getting this event * @param frInfo the routing table to update */ private void fillInCQRoutingInfo(CacheEvent event, boolean processLocalProfile, Profile[] peerProfiles, FilterRoutingInfo frInfo) { CqService cqService = getCqService(event.getRegion()); if (cqService != null) { try { Profile local = processLocalProfile ? this.localProfile : null; cqService.processEvents(event, local, peerProfiles, frInfo); } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); // If this ever returns, re-throw the error. We're poisoned // now, so don't let this thread continue. throw err; } catch (Throwable t) { SystemFailure.checkFailure(); logger.error("Exception occurred while processing CQs", t); } } }
@Override protected boolean operateOnRegion(CacheEvent event, ClusterDistributionManager dm) throws EntryNotFoundException { boolean sendReply = true; DistributedRegion region = (DistributedRegion) event.getRegion(); region.getCachePerfStats().incTombstoneGCCount(); FilterInfo routing = null; if (this.filterRouting != null) { routing = this.filterRouting.getFilterInfo(region.getMyId()); } region.expireTombstones(this.regionGCVersions, this.eventID, routing); this.appliedOperation = true; return sendReply; }
CqService cqService = getCqService(event.getRegion()); if (!isInConflict && cqService.isRunning() && this.region != null /*
ServerCQImpl cQuery = (ServerCQImpl) cqEntry.getValue(); if (!event.isOriginRemote() && event.getOperation().isRegionDestroy() && !((LocalRegion) event.getRegion()).isUsedForPartitionedRegionBucket()) { try { if (isDebugEnabled) {
@Override protected boolean operateOnRegion(CacheEvent event, ClusterDistributionManager dm) throws EntryNotFoundException { DistributedRegion region = (DistributedRegion) event.getRegion(); switch (this.clearOp) { case OP_CLEAR: region.clearRegionLocally((RegionEventImpl) event, false, this.rvv); region.notifyBridgeClients((RegionEventImpl) event); this.appliedOperation = true; break; case OP_LOCK_FOR_CLEAR: if (region.getDataPolicy().withStorage()) { DistributedClearOperation.regionLocked(this.getSender(), region.getFullPath(), region); region.lockLocallyForClear(dm, this.getSender(), event); } this.appliedOperation = true; break; } return true; }
CqService cqService = getCqService(event.getRegion()); if (cqService.isRunning()) { frInfo = new FilterRoutingInfo();
new ClientUpdateMessageImpl(operation, (LocalRegion) event.getRegion(), keyOfInterest, null, delta, (byte) 0x01, callbackArgument, membershipID, eventIdentifier, versionTag);