public void setAttributes(MemberAttributes p_attr) { MemberAttributes attr = p_attr; if (attr == null) { attr = MemberAttributes.INVALID; } processId = attr.getVmPid(); vmKind = attr.getVmKind(); directPort = attr.getPort(); vmViewId = attr.getVmViewId(); name = attr.getName(); groups = attr.getGroups(); durableClientAttributes = attr.getDurableClientAttributes(); }
/** * Construct a InternalDistributedMember. All fields are specified.<p> * * This, and the following constructor are the only valid ways to create an ID * for a distributed member for use * in the P2P cache. Use of other constructors can break network-partition-detection. * * @param i * @param p * the membership port * @param splitBrainEnabled whether this feature is enabled for the member * @param canBeCoordinator whether the member is eligible to be the membership coordinator * @param attr * the member's attributes */ public InternalDistributedMember(InetAddress i, int p, boolean splitBrainEnabled, boolean canBeCoordinator, MemberAttributes attr) { this.dcPort = attr.getPort(); this.vmPid = attr.getVmPid(); this.vmKind = attr.getVmKind(); this.vmViewId = attr.getVmViewId(); this.name = attr.getName(); this.groups = attr.getGroups(); this.durableClientAttributes = attr.getDurableClientAttributes(); this.ipAddr = (JGroupMember)MemberFactory.newNetMember(i, p, splitBrainEnabled, canBeCoordinator, attr); this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(i) : i.getHostAddress(); // checkHostName(); }
this.vmPid = attr.getVmPid(); this.vmKind = attr.getVmKind(); this.vmViewId = attr.getVmViewId(); this.name = attr.getName(); this.groups = attr.getGroups();
private void defaultToCurrentHost() { int defaultDcPort = MemberAttributes.DEFAULT.getPort(); // [bruce] disabled to allow loners to modify the ID post-connect // Assert.assertTrue(defaultDcPort > 0); this.dcPort = defaultDcPort;; this.vmKind = MemberAttributes.DEFAULT.getVmKind(); this.vmPid = MemberAttributes.DEFAULT.getVmPid(); this.name = MemberAttributes.DEFAULT.getName(); this.groups = MemberAttributes.DEFAULT.getGroups(); this.vmViewId = MemberAttributes.DEFAULT.getVmViewId(); this.durableClientAttributes = MemberAttributes.DEFAULT.getDurableClientAttributes(); if (this.ipAddr != null) { this.ipAddr.getAddress().setProcessId(this.vmPid); } try { if (SocketCreator.resolve_dns) { this.hostName = SocketCreator.getHostName(SocketCreator.getLocalHost()); } else { this.hostName = SocketCreator.getLocalHost().getHostAddress(); } } catch(UnknownHostException ee){ throw new InternalGemFireError(ee); } // checkHostName(); }
this.vmPid = attr.getVmPid(); this.vmKind = attr.getVmKind(); this.vmViewId = attr.getVmViewId(); this.name = attr.getName(); this.groups = attr.getGroups();
this.vmPid = attr.getVmPid(); this.vmKind = attr.getVmKind(); this.vmViewId = attr.getVmViewId(); this.name = attr.getName(); this.groups = attr.getGroups();
public static void insertGemFireAttributes(IpAddress addr, Object obj) { MemberAttributes attr = (MemberAttributes)obj; addr.setProcessId(attr.getVmPid()); addr.setVmKind(attr.getVmKind()); addr.setDirectPort(attr.getPort()); addr.setBirthViewId(attr.getVmViewId()); addr.setName(attr.getName()); addr.setRoles(attr.getGroups()); addr.setDurableClientAttributes(attr.getDurableClientAttributes()); addr.setSize(-1); addr.setSize(addr.size(Version.CURRENT_ORDINAL)); }
MemberAttributes.DEFAULT.getVmPid(), MemberAttributes.DEFAULT.getVmKind(), MemberAttributes.DEFAULT.getVmViewId(), MemberAttributes.DEFAULT.getName(), MemberAttributes.DEFAULT.getGroups(), MemberAttributes.DEFAULT.getDurableClientAttributes());