if (0 < ((IpAddress)dest_addr).getVersionOrdinal() && ((IpAddress)dest_addr).getVersionOrdinal() < destVersion) { destVersion = ((IpAddress)dest_addr).getVersionOrdinal();
public short getDestVersionOrdinal() { if (this.version > 0) { return JChannel.getGfFunctions().getSerializationVersionOrdinal(version); } short result = JChannel.getGfFunctions().getCurrentVersionOrdinal(); if (dest_addr != null && !dest_addr.isMulticastAddress()) { if (((IpAddress)dest_addr).getVersionOrdinal() < result) { result = JChannel.getGfFunctions().getSerializationVersionOrdinal(((IpAddress)dest_addr).getVersionOrdinal()); } } else { result = JChannel.getGfFunctions().getSerializationVersionOrdinal(multicastVersion); } return result; }
/** * For Externalizable * * @see java.io.Externalizable */ public void writeExternal(ObjectOutput out) throws IOException { if (ipAddr == null) throw new InternalGemFireError(LocalizedStrings.JGroupMember_ATTEMPT_TO_EXTERNALIZE_NULL_IP_ADDRESS.toLocalizedString()); // ipAddr.writeExternal(out); // do it the way we like byte[] address = ipAddr.getIpAddress().getAddress(); out.writeInt(address.length); // IPv6 compatible out.write(address); out.writeInt(ipAddr.getPort()); out.write(ipAddr.getFlags()); Version.writeOrdinal(out, ipAddr.getVersionOrdinal(), true); byte bytes[] = new MemberAttributes(ipAddr.getDirectPort(), ipAddr.getProcessId(), ipAddr.getVmKind(), ipAddr.getBirthViewId(), ipAddr.getName(), ipAddr.getRoles(), (DurableClientAttributes)ipAddr.getDurableClientAttributes()).toByteArray(); if (bytes == null) out.writeInt(0); else { out.writeInt(bytes.length); out.write(bytes); } }
if (entry.getVersionOrdinal() <= JGroupsVersion.CURRENT_ORDINAL) { serverOrdinal = entry.getVersionOrdinal(); gossipVersion = JChannel.getGfFunctions().getGossipVersionForOrdinal(serverOrdinal);
if (entry.getVersionOrdinal() <= JGroupsVersion.CURRENT_ORDINAL) { serverOrdinal = entry.getVersionOrdinal(); gossipVersion = JChannel.getGfFunctions().getGossipVersionForOrdinal(serverOrdinal);
if (entry.getVersionOrdinal() <= JGroupsVersion.CURRENT_ORDINAL) { serverOrdinal = entry.getVersionOrdinal(); gossipVersion = JChannel.getGfFunctions().getGossipVersionForOrdinal(serverOrdinal);
for (Iterator it=calculatedMembers.iterator(); it.hasNext(); ) { JGroupMember mbr = (JGroupMember)it.next(); short version = mbr.getAddress().getVersionOrdinal(); if (!messages.contains(version)) { Message jmsg = createJGMessage(msg, local, version); short version = to.getVersionOrdinal(); Message jmsg = messages.get(version); if (DistributionManager.VERBOSE || logger.fineEnabled())
this.version = addr.getVersionOrdinal(); this.versionObj = Version.fromOrdinalOrCurrent(version); cachedToString = null;
public void setPort(int p) { IpAddress i = new IpAddress(ipAddr.getIpAddress(), p); i.setFlags(ipAddr.getFlags()); i.setVmKind(ipAddr.getVmKind()); i.setDirectPort(ipAddr.getDirectPort()); i.setProcessId(ipAddr.getProcessId()); i.setRoles(ipAddr.getRoles()); i.setDurableClientAttributes(ipAddr.getDurableClientAttributes()); i.setVersionOrdinal(ipAddr.getVersionOrdinal()); this.ipAddr = i; } }