/** * Transfer the failure-detection ports from another view to this one * @param otherView */ public void setFailureDetectionPorts(NetView otherView) { int[] ports = otherView.getFailureDetectionPorts(); if (ports != null) { int idx = 0; int portsSize = ports.length; for (InternalDistributedMember mbr: otherView.getMembers()) { if (contains(mbr)) { // unit tests create views w/o failure detection ports, so we must check the length // of the array if (idx < portsSize) { setFailureDetectionPort(mbr, ports[idx]); } else { setFailureDetectionPort(mbr, -1); } } idx += 1; } } }
for (InternalDistributedMember mbr: joinReqs) { if (mbrs.contains(mbr)) { newView.setFailureDetectionPort(mbr, joinPorts.get(mbr));
newView.setFailureDetectionPort(localAddress, services.getHealthMonitor().getFailureDetectionPort()); this.localAddress.setVmViewId(0); installView(newView); removals); newView.setFailureDetectionPorts(currentView); newView.setFailureDetectionPort(this.localAddress, services.getHealthMonitor().getFailureDetectionPort());
int port = conflictingView.getFailureDetectionPort(mbr); newView.add(mbr); newView.setFailureDetectionPort(mbr, port); joinReqs.add(mbr); for (InternalDistributedMember mbr: newView.getMembers()) { if (tempView.contains(mbr)) { tempView.setFailureDetectionPort(mbr, newView.getFailureDetectionPort(mbr));
newView.setFailureDetectionPort(newMember, v.getFailureDetectionPort(newMember));