@Override public Set adviseDestroyRegion() { // fix for bug 37604 - tell all owners of the pr that the bucket is being // destroyed. This is needed when bucket cleanup is performed return this.regionAdvisor.adviseAllPRNodes(); }
@Override public Set adviseDestroyRegion() { // fix for bug 37604 - tell all owners of the pr that the bucket is being // destroyed. This is needed when bucket cleanup is performed return this.regionAdvisor.adviseAllPRNodes(); }
public Set adviseBucketProfileExchange() { // for TX, also need to send to accessors so that they can send // TX and commit ops directly to new node return adviseAllPRNodes(); //return adviseDataStore(); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public Set<DistributedMember> getMembers(Region r) { if (r instanceof DistributedRegion) { DistributedRegion d = (DistributedRegion) r; return (Set)d.getDistributionAdvisor().adviseCacheOp(); } else if (r instanceof PartitionedRegion) { PartitionedRegion p = (PartitionedRegion) r; return p.getRegionAdvisor().adviseAllPRNodes(); } else { return Collections.emptySet(); } }
public Set<DistributedMember> getMembers(Region r) { if (r instanceof DistributedRegion) { DistributedRegion d = (DistributedRegion) r; return d.getDistributionAdvisor().adviseCacheOp(); } else if (r instanceof PartitionedRegion) { PartitionedRegion p = (PartitionedRegion) r; return p.getRegionAdvisor().adviseAllPRNodes(); } else { return Collections.EMPTY_SET; } }
try { PartitionResponse response = DumpB2NRegion.send(this.getRegionAdvisor() .adviseAllPRNodes(), this, bucketId, false); response.waitForRepliesUninterruptibly(); this.dumpB2NForBucket(bucketId);
protected synchronized void initRMLWrappers() { if (PartitionedRegion.this.isInitialized() && hasListener()) { initPostCreateRegionMembershipListeners(getRegionAdvisor().adviseAllPRNodes()); } }
protected synchronized void initRMLWrappers() { if (PartitionedRegion.this.isInitialized() && hasListener()) { initPostCreateRegionMembershipListeners(getRegionAdvisor().adviseAllPRNodes()); } }
receipients = pr.getRegionAdvisor().adviseAllPRNodes();
receipients = pr.getRegionAdvisor().adviseAllPRNodes();
/** * * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to validate that the meta-data * for buckets agrees with the data store's perspective * * @throws ReplyException * @see #dumpAllBuckets(boolean) */ public void validateAllBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, true /* only validate */, false); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpEntries(true /* onlyValidate */); } }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * buckets to the system.log and validate that the meta-data for buckets * agrees with the data store's perspective * * @param distribute true will distributed a DumpBucketsMessage to PR nodes * @throws ReplyException * @see #validateAllBuckets() */ public void dumpAllBuckets(boolean distribute) throws ReplyException { if (logger.isDebugEnabled()) { logger.debug("[dumpAllBuckets] distribute={} {}", distribute, this); } getRegionAdvisor().dumpProfiles("dumpAllBuckets"); if (distribute) { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, false /* only validate */, false); response.waitForRepliesUninterruptibly(); } if (this.dataStore != null) { this.dataStore.dumpEntries(false /* onlyValidate */); } }
/** * * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to validate that the meta-data * for buckets agrees with the data store's perspective * * @throws ReplyException * @see #dumpAllBuckets(boolean, LogWriterI18n) */ public void validateAllBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, true /* only validate */, false); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpEntries(true /* onlyValidate */, null); } }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * allPartitionedRegions for this PartitionedRegion. * * @throws ReplyException */ public void sendDumpAllPartitionedRegions() throws ReplyException { getRegionAdvisor().dumpProfiles(logger, "dumpAllPartitionedRegions"); PartitionResponse response = DumpAllPRConfigMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this); response.waitForRepliesUninterruptibly(); dumpSelfEntryFromAllPartitionedRegions(); }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * allPartitionedRegions for this PartitionedRegion. * * @throws ReplyException */ public void sendDumpAllPartitionedRegions() throws ReplyException { getRegionAdvisor().dumpProfiles("dumpAllPartitionedRegions"); PartitionResponse response = DumpAllPRConfigMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this); response.waitForRepliesUninterruptibly(); dumpSelfEntryFromAllPartitionedRegions(); }
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); } }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump the contents of the * buckets to the system.log and validate that the meta-data for buckets * agrees with the data store's perspective * * @param distribute true will distributed a DumpBucketsMessage to PR nodes * @throws ReplyException * @see #validateAllBuckets() */ public void dumpAllBuckets(boolean distribute, LogWriterI18n log) throws ReplyException { LogWriterI18n logWriter = log; if (logWriter == null) { logWriter = logger; } logWriter.info(LocalizedStrings.DEBUG, "[dumpAllBuckets] distribute=" + distribute + " " + this); getRegionAdvisor().dumpProfiles(logWriter, "dumpAllBuckets"); if (distribute) { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseAllPRNodes(), this, false /* only validate */, false); response.waitForRepliesUninterruptibly(); } if (this.dataStore != null) { this.dataStore.dumpEntries(false /* onlyValidate */, logWriter); } }
try { PartitionResponse response = DumpB2NRegion.send(this.getRegionAdvisor() .adviseAllPRNodes(), this, bucketId, false); response.waitForRepliesUninterruptibly(); this.dumpB2NForBucket(bucketId);