public static DumpB2NResponse send(Set recipients, PartitionedRegion r, int bId, boolean justPrimaryInfo) { DumpB2NResponse p = new DumpB2NResponse(r.getSystem(), recipients); DumpB2NRegion m = new DumpB2NRegion(recipients, r.getPRId(), p, bId, justPrimaryInfo); r.getDistributionManager().putOutgoing(m); return p; }
@Override protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr, long startTime) throws CacheException { PrimaryInfo pinfo = null; if (this.onlyReturnPrimaryInfo) { pinfo = new PrimaryInfo(pr.getRegionAdvisor().getBucket(this.bucketId).isHosting(), pr.getRegionAdvisor().isPrimaryForBucket(this.bucketId), ""); } else { pr.dumpB2NForBucket(this.bucketId); } DumpB2NReplyMessage.send(getSender(), getProcessorId(), dm, pinfo); return false; }
getRegionAdvisor().dumpProfiles("dumpB2NForBucket"); try { PartitionResponse response = DumpB2NRegion.send(this.getRegionAdvisor() .adviseAllPRNodes(), this, bucketId, false); response.waitForRepliesUninterruptibly();
ReplyException rex = new ReplyException( new TimeoutException("Waited too long for region to initialize")); sendReply(getSender(), this.processorId, dm, rex, null, 0); return; sendReply(this.sender,this.processorId , dm, new ReplyException(e), pr, 0); sendReply(this.sender,this.processorId , dm, new ReplyException(e), pr, 0); return; sendReply(this.sender,this.processorId , dm, new ReplyException(rde), pr, 0); return;
ReplyException rex = new ReplyException( new TimeoutException("Waited too long for region to initialize")); sendReply(getSender(), this.processorId, dm, rex, null, 0); return; sendReply(this.sender,this.processorId , dm, new ReplyException(e), pr, 0); sendReply(this.sender,this.processorId , dm, new ReplyException(e), pr, 0); return; sendReply(this.sender,this.processorId , dm, new ReplyException(rde), pr, 0); return;
@Override protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr, long startTime) throws CacheException { // final LogWriterI18n l = pr.getCache().getLogger(); // if (DistributionManager.VERBOSE) { // l.fine("DumpB2N operateOnRegion: " + pr.getFullPath()); // } PrimaryInfo pinfo = null; if (this.onlyReturnPrimaryInfo) { pinfo = new PrimaryInfo(pr.getRegionAdvisor().getBucket(this.bucketId).isHosting(), pr.getRegionAdvisor().isPrimaryForBucket(this.bucketId), ""); } else { pr.dumpB2NForBucket(this.bucketId); } DumpB2NReplyMessage.send(getSender(), getProcessorId(), dm, pinfo); // if (DistributionManager.VERBOSE) { // l.fine(getClass().getName() + " dumped b2n region"); // } return false; }
for (int i=0; i<3; i++) { rte = null; DumpB2NResponse response = DumpB2NRegion.send(getRegionAdvisor() .adviseDataStore(), this, bucketId, true); try {
public static DumpB2NResponse send(Set recipients, PartitionedRegion r, int bId, boolean justPrimaryInfo) { final TXStateInterface tx = r.getTXState(); DumpB2NResponse p = new DumpB2NResponse(r.getSystem(), recipients, tx); DumpB2NRegion m = new DumpB2NRegion(recipients, r.getPRId(), p, bId, justPrimaryInfo, tx); r.getDistributionManager().putOutgoing(m); return p; }
DumpB2NResponse response = DumpB2NRegion.send(getRegionAdvisor() .adviseDataStore(), this, bucketId, true); List remoteInfos = new LinkedList(response.waitForPrimaryInfos());
registerDSFID(PR_FETCH_KEYS_REPLY_MESSAGE, () -> new FetchKeysReplyMessage()); registerDSFID(PR_DUMP_B2N_REGION_MSG, () -> new DumpB2NRegion()); registerDSFID(PR_DUMP_B2N_REPLY_MESSAGE, () -> new DumpB2NReplyMessage()); registerDSFID(DESTROY_PARTITIONED_REGION_MESSAGE,
getRegionAdvisor().dumpProfiles(logger, "dumpB2NForBucket"); try { PartitionResponse response = DumpB2NRegion.send(this.getRegionAdvisor() .adviseAllPRNodes(), this, bucketId, false); response.waitForRepliesUninterruptibly();