/** returns true if the receiver can distribute during cache closure */ public boolean canBeSentDuringShutdown() { return getRegion().isUsedForPartitionedRegionAdmin(); }
protected boolean shouldAck() { return getRegion().scope.isAck(); }
protected Set getRecipients() { CacheDistributionAdvisor advisor = getRegion().getCacheDistributionAdvisor(); this.originalRecipients = advisor.adviseCacheOp(); return this.originalRecipients; }
/** * region's distribution advisor marked that a distribution is ended. This method should pair with * startOperation in try/finally block. */ public void endOperation(long viewVersion) { DistributedRegion region = getRegion(); if (viewVersion != -1) { region.getDistributionAdvisor().endOperation(viewVersion); if (logger.isTraceEnabled()) { logger.trace(LogMarker.STATE_FLUSH_OP_VERBOSE, "done dispatching operation in view version {}", viewVersion); } } }
private void handleClosedMembers(Set<InternalDistributedMember> closedMembers, Map<InternalDistributedMember, PersistentMemberID> persistentIds) { if (persistentIds == null) { return; } for (InternalDistributedMember member : closedMembers) { PersistentMemberID persistentId = persistentIds.get(member); if (persistentId != null) { // Fix for bug 42142 - In order for recovery to work, // we must either // 1) persistent the region operation successfully on the peer // 2) record that the peer is offline // or // 3) fail the operation // if we have started to shutdown, we don't want to mark the peer // as offline, or we will think we have newer data when in fact we don't getRegion().getCancelCriterion().checkCancelInProgress(null); // Otherwise, mark the peer as offline, because it didn't complete // the operation. getRegion().getPersistenceAdvisor().markMemberOffline(member, persistentId); } } }
/** * @param frInfo the filter routing computed for distribution to peers * @return the filter routing computed for distribution to clients of this process */ protected FilterInfo getLocalFilterRouting(FilterRoutingInfo frInfo) { FilterProfile fp = getRegion().getFilterProfile(); if (fp == null) { return null; } FilterRoutingInfo fri = fp.getFilterRoutingInfoPart2(frInfo, this.event); if (fri == null) { return null; } return fri.getLocalFilterInfo(); }
protected FilterRoutingInfo getRecipientFilterRouting(Set cacheOpRecipients) { LocalRegion region = getRegion(); if (!region.isUsedForPartitionedRegionBucket()) { return null; } CacheDistributionAdvisor advisor; advisor = region.getPartitionedRegion().getCacheDistributionAdvisor(); return advisor.adviseFilterRouting(this.event, cacheOpRecipients); }
CacheProfile cf = (CacheProfile) ((Bucket) getRegion()).getPartitionedRegion() .getCacheDistributionAdvisor().getProfile(m);
DistributedRegion region = getRegion(); long viewVersion = -1; try {
DistributedRegion region = getRegion(); DistributionManager mgr = region.getDistributionManager(); boolean reliableOp = isOperationReliable() && region.requiresReliabilityCheck(); DistributedRegion r = getRegion(); if (r.isUsedForPartitionedRegionBucket() && event.getOperation().isEntry()) { PartitionMessage pm = ((EntryEventImpl) event).getPartitionMessage();
protected void initMessage(CacheOperationMessage msg, DirectReplyProcessor p) { msg.regionPath = getRegion().getFullPath(); msg.processorId = p == null ? 0 : p.getProcessorId(); msg.processor = p; if (this.event.getOperation().isEntry()) { EntryEventImpl entryEvent = getEvent(); msg.callbackArg = entryEvent.getRawCallbackArgument(); msg.possibleDuplicate = entryEvent.isPossibleDuplicate(); VersionTag tag = entryEvent.getVersionTag(); msg.setInhibitNotificationsBit(entryEvent.inhibitAllNotifications()); if (tag != null && tag.hasValidVersion()) { msg.setVersionTag(tag); } } else { msg.callbackArg = ((RegionEventImpl) this.event).getRawCallbackArgument(); } msg.op = this.event.getOperation(); msg.owner = this; msg.regionAllowsConflation = getRegion().getEnableAsyncConflation(); }