/** * Create a CacheMember referring to the current host (as defined by * the given string). * * @param i the hostname, must be for the current host * @param p the membership listening port * @param splitBrainEnabled whether the member has network partition detection enabled * @param canBeCoordinator whether the member can be group coordinator */ public JGroupMember(InetAddress i, int p, boolean splitBrainEnabled, boolean canBeCoordinator) { ipAddr = new IpAddress(i, p); ipAddr.splitBrainEnabled(splitBrainEnabled); ipAddr.shouldntBeCoordinator(!canBeCoordinator); }
members[i++].shouldntBeCoordinator(false); members[i++].shouldntBeCoordinator(false); members[i++].shouldntBeCoordinator(true); members[i++].shouldntBeCoordinator(true); members[i++].shouldntBeCoordinator(true); members[i++].shouldntBeCoordinator(true); joiningMember.shouldntBeCoordinator(true);
log.getLogWriter().fine("This member of the distributed system will only be a coordinator if there are no locators available"); ((IpAddress)local_addr).shouldntBeCoordinator(true); Event newaddr = new Event(Event.SET_LOCAL_ADDRESS, this.local_addr);