if (netMbr.isNetworkPartitionDetectionEnabled()) flags |= NPD_ENABLED_BIT; if (netMbr.preferredForCoordinator())
if (netMbr.isNetworkPartitionDetectionEnabled()) flags |= NPD_ENABLED_BIT; if (netMbr.preferredForCoordinator())
@Override public void writeEssentialData(DataOutput out) throws IOException { Assert.assertTrue(netMbr.getVmKind() > 0); DataSerializer.writeInetAddress(getInetAddress(), out); out.writeInt(getPort()); int flags = 0; if (netMbr.isNetworkPartitionDetectionEnabled()) flags |= NPD_ENABLED_BIT; if (netMbr.preferredForCoordinator()) flags |= COORD_ENABLED_BIT; flags |= PARTIAL_ID_BIT; out.writeByte((byte) (flags & 0xff)); // out.writeInt(dcPort); byte vmKind = netMbr.getVmKind(); out.writeByte(vmKind); if (vmKind == ClusterDistributionManager.LONER_DM_TYPE) { DataSerializer.writeString(this.uniqueTag, out); } else { // added in 6.5 for unique identifiers in P2P DataSerializer.writeString(String.valueOf(netMbr.getVmViewId()), out); } // write name last to fix bug 45160 DataSerializer.writeString(netMbr.getName(), out); Version outputVersion = InternalDataSerializer.getVersionForDataStream(out); if (0 <= outputVersion.compareTo(Version.GFE_90) && outputVersion.compareTo(Version.GEODE_110) < 0) { netMbr.writeAdditionalData(out); } }
if (netMbr.isNetworkPartitionDetectionEnabled()) flags |= NPD_ENABLED_BIT; if (netMbr.preferredForCoordinator())
if (mbr != coordinator && (coordinator == null || mbr.compareTo(coordinator) < 0)) { if (!rejections.contains(mbr) && (mbr.getNetMember().preferredForCoordinator() || !mbr.getNetMember().isNetworkPartitionDetectionEnabled())) { coordinator = mbr;