public boolean done() { int numProfiles; numProfiles = adv.adviseReplicates().size(); return numProfiles == expectedProfiles; } public String description() {
@Override void basicClear(RegionEventImpl regionEvent, boolean cacheWrite) { if (this.concurrencyChecksEnabled && !this.dataPolicy.withReplication()) { boolean retry = false; do { // non-replicate regions must defer to a replicate for clear/invalidate of region Set<InternalDistributedMember> repls = this.distAdvisor.adviseReplicates(); if (repls.size() > 0) { InternalDistributedMember mbr = repls.iterator().next(); RemoteRegionOperation op = RemoteRegionOperation.clear(mbr, this); try { op.distribute(); return; } catch (CancelException e) { this.stopper.checkCancelInProgress(e); retry = true; } catch (RemoteOperationException e) { this.stopper.checkCancelInProgress(e); retry = true; } } } while (retry); } // if no version vector or if no replicates are around, use the default mechanism super.basicClear(regionEvent, cacheWrite); }
@Override void basicClear(RegionEventImpl regionEvent, boolean cacheWrite) { if (this.concurrencyChecksEnabled && !this.dataPolicy.withReplication()) { boolean retry = false; do { // non-replicate regions must defer to a replicate for clear/invalidate of region Set<InternalDistributedMember> repls = this.distAdvisor.adviseReplicates(); if (repls.size() > 0) { InternalDistributedMember mbr = repls.iterator().next(); RemoteRegionOperation op = RemoteRegionOperation.clear(mbr, this); try { op.distribute(); return; } catch (CancelException e) { this.stopper.checkCancelInProgress(e); retry = true; } catch (RemoteOperationException e) { this.stopper.checkCancelInProgress(e); retry = true; } } } while (retry); } // if no version vector or if no replicates are around, use the default mechanism super.basicClear(regionEvent, cacheWrite); }
msg.regionPath = this.region.getFullPath(); msg.lostVersionSources = needsSync.toArray(new VersionSource[needsSync.size()]); Set recipients = this.region.getCacheDistributionAdvisor().adviseReplicates(); for (Iterator it=recipients.iterator(); it.hasNext(); ) { InternalDistributedMember mbr = (InternalDistributedMember)it.next();
public static void send(BucketRegion r, final Set<Object> keys, EventID eventID) { Set<InternalDistributedMember> recipients = r.getPartitionedRegion().getRegionAdvisor().adviseAllPRNodes(); recipients.removeAll(r.getDistributionAdvisor().adviseReplicates()); if (recipients.size() == 0) { return; } PartitionResponse p = new Response(r.getSystem(), recipients); PRTombstoneMessage m = new PRTombstoneMessage(recipients, r.getPartitionedRegion().getPRId(), p, keys, eventID); r.getDistributionManager().putOutgoing(m); try { p.waitForCacheException(); } catch (ForceReattemptException e) { // ignore - the member is going away or has destroyed the PR so // it won't be forwarding anything to clients for the PR } }
public static void send(BucketRegion r, final Set<Object> keys, EventID eventID) { Set<InternalDistributedMember> recipients = r.getPartitionedRegion().getRegionAdvisor().adviseAllPRNodes(); recipients.removeAll(r.getDistributionAdvisor().adviseReplicates()); if (recipients.size() == 0) { return; } PartitionResponse p = new Response(r.getSystem(), recipients); PRTombstoneMessage m = new PRTombstoneMessage(recipients, r.getPartitionedRegion().getPRId(), p, keys, eventID); r.getDistributionManager().putOutgoing(m); try { p.waitForCacheException(); } catch (ForceReattemptException e) { throw new InternalGemFireError("unexpected ForceReattemptException", e); } }
int numProfiles = 0; if (currentPolicy == DataPolicy.PRELOADED) { numProfiles = adv.advisePreloadeds().size()+adv.adviseReplicates().size(); } else { numProfiles = adv.adviseReplicates().size();
msg.regionPath = this.region.getFullPath(); msg.lostVersionSources = needsSync.toArray(new VersionSource[needsSync.size()]); msg.setRecipients(this.region.getCacheDistributionAdvisor().adviseReplicates()); if (log.fineEnabled()) { log.fine("Local versions were found that the image provider has not seen for " + needsSync);
attempts++; Set<InternalDistributedMember> replicates = dr .getCacheDistributionAdvisor().adviseReplicates(); if (replicates.isEmpty()) { return false;
members = cda.adviseReplicates(); dm = cda.getDistributionManager();
members = cda.adviseReplicates(); dm = cda.getDistributionManager();
members = cda.adviseReplicates(); dm = cda.getDistributionManager();