public Object call() { PartitionedRegion pr = (PartitionedRegion) getCache().getRegion(regionPath[0]); BecomePrimaryBucketResponse response = BecomePrimaryBucketMessage.send(members[finalOtherVM], pr, 0, false); if (response != null) { return Boolean.valueOf(response.waitForResponse()); } else { return Boolean.FALSE; } } })).booleanValue();
"BecomePrimaryBucketMessage NULL recipient"); BecomePrimaryBucketResponse response = new BecomePrimaryBucketResponse( pr.getSystem(), recipient, pr); BecomePrimaryBucketMessage msg = new BecomePrimaryBucketMessage(
target, pr, bucketId, forRebalance); if (response != null) { movedPrimary = response.waitForResponse();
target, pr, bucketId, forRebalance); if (response != null) { movedPrimary = response.waitForResponse();
"BecomePrimaryBucketMessage NULL recipient"); BecomePrimaryBucketResponse response = new BecomePrimaryBucketResponse( pr.getSystem(), recipient, pr); BecomePrimaryBucketMessage msg = new BecomePrimaryBucketMessage(
@Override public void process(DistributionMessage msg) { try { if (msg instanceof BecomePrimaryBucketReplyMessage) { BecomePrimaryBucketReplyMessage reply = (BecomePrimaryBucketReplyMessage)msg; this.success = reply.isSuccess(); if (reply.isSuccess()) { if (DistributionManager.VERBOSE) { getDistributionManager().getLoggerI18n().fine( "BecomePrimaryBucketResponse return OK"); } } else if (DistributionManager.VERBOSE) { getDistributionManager().getLoggerI18n().fine( "BecomePrimaryBucketResponse return NOT_PRIMARY"); } } } finally { super.process(msg); } }
/** * @return true if recipient successfully became or was already the primary */ public boolean waitForResponse() { waitForRepliesUninterruptibly(); return this.success; } }
/** * Ignore any incoming exception from other VMs, we just want an * acknowledgement that the message was processed. */ @Override protected void processException(ReplyException ex) { getDistributionManager().getLoggerI18n().fine( "BecomePrimaryBucketMessage ignoring exception", ex); }
/** * @return true if recipient successfully became or was already the primary */ public boolean waitForResponse() { waitForRepliesUninterruptibly(); return this.success; } }