protected final DistributedRegion getRegion() { return (DistributedRegion)this.event.getRegion(); }
protected final DistributedRegion getRegion() { return (DistributedRegion)this.event.getRegion(); }
private void removeDestroyTokensFromCqResultKeys(InternalCacheEvent event, FilterInfo filterInfo){ FilterProfile regionProfile = ((LocalRegion)event.getRegion()).getFilterProfile(); if (event.getOperation().isEntry() && filterInfo.getCQs() != null) { EntryEventImpl entryEvent = (EntryEventImpl)event; for (Map.Entry<Long, Integer> e: filterInfo.getCQs().entrySet()) { Long cqID = e.getKey(); String cqName = regionProfile.getRealCqID(cqID); if (cqName != null) { ServerCQ cq = regionProfile.getCq(cqName); if (cq != null && e.getValue().equals(Integer.valueOf(MessageType.LOCAL_DESTROY))) { cq.removeFromCqResultKeys(entryEvent.getKey(), true); } } } } }
private void removeDestroyTokensFromCqResultKeys(InternalCacheEvent event, FilterInfo filterInfo){ FilterProfile regionProfile = ((LocalRegion)event.getRegion()).getFilterProfile(); if (event.getOperation().isEntry() && filterInfo.getCQs() != null) { EntryEventImpl entryEvent = (EntryEventImpl)event; for (Map.Entry<Long, Integer> e: filterInfo.getCQs().entrySet()) { Long cqID = e.getKey(); String cqName = regionProfile.getRealCqID(cqID); if (cqName != null) { CqQueryImpl cq = (CqQueryImpl)regionProfile.getCq(cqName); if (cq != null && e.getValue().equals(Integer.valueOf(MessageType.LOCAL_DESTROY))) { cq.removeFromCqResultKeys(entryEvent.getKey(), true); } } } } }
/** * @param event * @param eventID * @return true if the event should not be tracked, false otherwise */ private boolean ignoreEvent(InternalCacheEvent event, EventID eventID) { if (eventID == null) { return true; } else { boolean isVersioned = (event.getVersionTag() != null); boolean isClient = event.hasClientOrigin(); if (isVersioned && isClient) { return false; // version tags for client events are kept for retries by the client } boolean isEntry = event.getOperation().isEntry(); boolean isPr = event.getRegion().getAttributes().getDataPolicy().withPartitioning() || ((LocalRegion)event.getRegion()).isUsedForPartitionedRegionBucket(); return (!isClient && // ignore if it originated on a server, and isEntry && // it affects an entry and !isPr); // is not on a PR } }
/** * @param event * @param eventID * @return true if the event should not be tracked, false otherwise */ private boolean ignoreEvent(InternalCacheEvent event, EventID eventID) { if (eventID == null) { return true; } else { boolean isVersioned = (event.getVersionTag() != null); boolean isClient = event.hasClientOrigin(); if (isVersioned && isClient) { return false; // version tags for client events are kept for retries by the client } boolean isEntry = event.getOperation().isEntry(); boolean isPr = event.getRegion().getAttributes().getDataPolicy().withPartitioning() || ((LocalRegion)event.getRegion()).isUsedForPartitionedRegionBucket(); return (!isClient && // ignore if it originated on a server, and isEntry && // it affects an entry and (!isPr && !GemFireCacheImpl.gfxdSystem())); // is not on a PR } }
RegionVersionVector v = ((LocalRegion)event.getRegion()).getVersionVector();
RegionVersionVector v = ((LocalRegion)event.getRegion()).getVersionVector();
@Override protected FilterRoutingInfo getRecipientFilterRouting(Set cacheOpRecipients) { // for removeAll, we need to determine the routing information for each event and // create a consolidated routing object representing all events that can be // used for distribution CacheDistributionAdvisor advisor; LocalRegion region = (LocalRegion)this.event.getRegion(); if (region instanceof PartitionedRegion) { advisor = ((PartitionedRegion)region).getCacheDistributionAdvisor(); } else if (region.isUsedForPartitionedRegionBucket()) { advisor = ((BucketRegion)region).getPartitionedRegion().getCacheDistributionAdvisor(); } else { advisor = ((DistributedRegion)region).getCacheDistributionAdvisor(); } FilterRoutingInfo consolidated = new FilterRoutingInfo(); for (int i=0; i<this.removeAllData.length; i++) { EntryEventImpl ev = getEventForPosition(i); if (ev != null) { FilterRoutingInfo eventRouting = advisor.adviseFilterRouting(ev, cacheOpRecipients); if (eventRouting != null) { consolidated.addFilterInfo(eventRouting); } removeAllData[i].filterRouting = eventRouting; } } // we need to create routing information for each PUT event return consolidated; }
@Override protected FilterRoutingInfo getRecipientFilterRouting(Set cacheOpRecipients) { // for putAll, we need to determine the routing information for each event and // create a consolidated routing object representing all events that can be // used for distribution CacheDistributionAdvisor advisor; LocalRegion region = (LocalRegion)this.event.getRegion(); if (region instanceof PartitionedRegion) { advisor = ((PartitionedRegion)region).getCacheDistributionAdvisor(); } else if (region.isUsedForPartitionedRegionBucket()) { advisor = ((BucketRegion)region).getPartitionedRegion().getCacheDistributionAdvisor(); } else { advisor = ((DistributedRegion)region).getCacheDistributionAdvisor(); } FilterRoutingInfo consolidated = new FilterRoutingInfo(); for (int i=0; i<this.putAllData.length; i++) { EntryEventImpl ev = getEventForPosition(i); if (ev != null) { FilterRoutingInfo eventRouting = advisor.adviseFilterRouting(ev, cacheOpRecipients); if (eventRouting != null) { consolidated.addFilterInfo(eventRouting); } putAllData[i].filterRouting = eventRouting; } } // we need to create routing information for each PUT event return consolidated; }
RegionAttributes attr = this.event.getRegion().getAttributes(); if (attr.getConcurrencyChecksEnabled() && !attr.getDataPolicy().withReplication()
RegionAttributes attr = this.event.getRegion().getAttributes(); if (attr.getConcurrencyChecksEnabled() && !attr.getDataPolicy().withReplication()
@Override protected FilterRoutingInfo getRecipientFilterRouting(Set cacheOpRecipients) { // for putAll, we need to determine the routing information for each event and // create a consolidated routing object representing all events that can be // used for distribution CacheDistributionAdvisor advisor; LocalRegion region = (LocalRegion)this.event.getRegion(); if (region instanceof PartitionedRegion) { advisor = ((PartitionedRegion)region).getCacheDistributionAdvisor(); } else if (region.isUsedForPartitionedRegionBucket()) { advisor = ((BucketRegion)region).getPartitionedRegion().getCacheDistributionAdvisor(); } else { advisor = ((DistributedRegion)region).getCacheDistributionAdvisor(); } FilterRoutingInfo consolidated = new FilterRoutingInfo(); for (int i=0; i<this.putAllData.length; i++) { EntryEventImpl ev = getEventForPosition(i); if (ev != null) { FilterRoutingInfo eventRouting = advisor.adviseFilterRouting(ev, cacheOpRecipients); if (eventRouting != null) { consolidated.addFilterInfo(eventRouting); } putAllData[i].filterRouting = eventRouting; } } // we need to create routing information for each PUT event return consolidated; }
FilterProfile regionProfile = ((LocalRegion)event.getRegion()).getFilterProfile(); if (filterInfo != null) {
RegionAttributes attr = this.event.getRegion().getAttributes(); if (attr.getConcurrencyChecksEnabled() && !attr.getDataPolicy().withReplication() && attr.getScope() != Scope.GLOBAL) { if (attr.getDataPolicy() == DataPolicy.EMPTY) {
return entry.event; LocalRegion region = (LocalRegion)this.event.getRegion(); EntryEventImpl ev = EntryEventImpl.create( region,
(LocalRegion)this.event.getRegion(), entry.getOp(),
return entry.event; LocalRegion region = (LocalRegion)this.event.getRegion(); EntryEventImpl ev = EntryEventImpl.create( region,