public MemberAttributes getAttributes() { return new MemberAttributes(directPort, processId, vmKind, vmViewId, name, groups, durableClientAttributes); }
public static void setDefaults(int dcPort, int vmPid, int vmKind, int vmViewId, String name, String[] groups, DurableClientAttributes durableClientAttributes) { DEFAULT = new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes); }
private void synchPayload() { netMbr.setAttributes(new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes)); }
private void synchPayload() { ipAddr.setAttributes(new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes)); }
public static MemberAttributes fromByteArray(byte[] bytes) { try { return new MemberAttributes(bytes); } catch (IOException e) { throw new InternalGemFireError(LocalizedStrings.MemberAttributes_IOEXCEPTION_ON_A_BYTE_ARRAY_0.toLocalizedString(e)); } catch (ClassNotFoundException e) { throw new InternalGemFireError(LocalizedStrings.MemberAttributes_CLASSNOTFOUNDEXCEPTION_IN_DESERIALIZATION_0.toLocalizedString(e)); } }
private void _readEssentialData(DataInput in) throws IOException, ClassNotFoundException { this.isPartial = true; InetAddress inetAddr = DataSerializer.readInetAddress(in); int port = in.readInt(); this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(inetAddr) : inetAddr.getHostAddress(); int flags = in.readUnsignedByte(); boolean sbEnabled = (flags & SB_ENABLED_MASK) != 0; boolean elCoord = (flags & COORD_ENABLED_MASK) != 0; this.vmKind = in.readUnsignedByte(); if (this.vmKind == DistributionManager.LONER_DM_TYPE) { this.uniqueTag = DataSerializer.readString(in); } else { String str = DataSerializer.readString(in); if (str != null) { // backward compatibility from earlier than 6.5 this.vmViewId = Integer.parseInt(str); } } /*this.name =*/ DataSerializer.readString(in); MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid, this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes); ipAddr = (JGroupMember)MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, attr); synchPayload(); }
/** * For Externalizable * * @see java.io.Externalizable */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // ipAddr = new IpAddress(); // ipAddr.readExternal(in); // do it the way we like int len = in.readInt(); // IPv6 compatible byte addr[] = new byte[len]; in.readFully(addr); InetAddress ia = InetAddress.getByAddress(addr); int port = in.readInt(); byte flags = in.readByte(); ipAddr = new IpAddress(ia, port); ipAddr.setFlags(flags); ipAddr.readVersion(flags, in); len = in.readInt(); if (len != 0) { byte bytes[] = new byte[len]; in.readFully(bytes); GFJGBasicAdapter.insertGemFireAttributes(ipAddr, new MemberAttributes(bytes)); } }
/** * 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); } }
MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid, this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes); netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, version, attr);
this.durableClientAttributes = new DurableClientAttributes(durableId, durableTimeout); MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid, this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes); netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord,
new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes)); if (this.version >= Version.GFE_90.ordinal()) { try {
private void _readEssentialData(DataInput in) throws IOException, ClassNotFoundException { this.isPartial = true; InetAddress inetAddr = DataSerializer.readInetAddress(in); int port = in.readInt(); this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(inetAddr) : inetAddr.getHostAddress(); int flags = in.readUnsignedByte(); boolean sbEnabled = (flags & SB_ENABLED_MASK) != 0; boolean elCoord = (flags & COORD_ENABLED_MASK) != 0; this.vmKind = in.readUnsignedByte(); if (this.vmKind == DistributionManager.LONER_DM_TYPE) { this.uniqueTag = DataSerializer.readString(in); } else { String str = DataSerializer.readString(in); if (str != null) { // backward compatibility from earlier than 6.5 this.vmViewId = Integer.parseInt(str); } } this.name = DataSerializer.readString(in); MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid, this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes); netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, InternalDataSerializer.getVersionForDataStream(in).ordinal(), attr); synchPayload(); if (InternalDataSerializer.getVersionForDataStream(in).compareTo(Version.GFE_90)>=0) { netMbr.readAdditionalData(in); } }
MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid, this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes); ipAddr = (JGroupMember)MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, attr);
new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes)); ipAddr.getAddress().setVersionOrdinal(this.version);
public MemberAttributes getAttributes() { return new MemberAttributes(ipAddr.getDirectPort(), ipAddr.getProcessId(), ipAddr.getVmKind(), ipAddr.getBirthViewId(), ipAddr.getName(), ipAddr.getRoles(), (DurableClientAttributes)ipAddr.getDurableClientAttributes()); }
MemberAttributes ma = new MemberAttributes(0, -1, DistributionManager.NORMAL_DM_TYPE, -1, null, null, null); sid = new InternalDistributedMember(mySock.getInetAddress(), mySock.getPort(), false, true, ma);
MemberAttributes mattr = new MemberAttributes(p, com.gemstone.gemfire.internal.OSProcess.getId(), vmKind, -1,
MemberAttributes ma = new MemberAttributes(0, -1, DistributionManager.NORMAL_DM_TYPE, -1, null, null, null); sid = new InternalDistributedMember(mySock.getInetAddress(), mySock.getPort(), false, true, ma);
.getDurableClientTimeout()); MemberAttributes attr = new MemberAttributes( -1/*dcPort - not known at this time*/, OSProcess.getId(),