/** * Create a InternalDistributedMember referring to the current host (as defined by the given * string).<p> * * <b> * THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> **/ public InternalDistributedMember(String i, int p, Version version, NetMember netMember) throws UnknownHostException { netMbr = netMember; defaultToCurrentHost(); this.vmKind = DistributionManager.NORMAL_DM_TYPE; this.versionObj = version; }
/** * Create a InternalDistributedMember referring to the current host (as defined by the given * address).<p> * * <b> * [bruce]THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> * * * @param i * the hostname, must be for the current host * @param p * the membership listening port */ public InternalDistributedMember(InetAddress i, int p) { netMbr = MemberFactory.newNetMember(i, p); defaultToCurrentHost(); }
/** * Create a InternalDistributedMember referring to the current host (as defined by the given * address).<p> * * <b> * [bruce]THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> * * * @param i * the hostname, must be for the current host * @param p * the membership listening port */ public InternalDistributedMember(InetAddress i, int p) { ipAddr = (JGroupMember)MemberFactory.newNetMember(i, p); defaultToCurrentHost(); }
/** * Create a InternalDistributedMember as defined by the given address. * <p> * * <b> * [bruce]THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> * * @param addr * address of the server * @param p * the listening port of the server * @param isCurrentHost * true if the given host refers to the current host (bridge and * gateway use false to create a temporary id for the OTHER side of a * connection) */ public InternalDistributedMember(InetAddress addr, int p, boolean isCurrentHost) { netMbr = MemberFactory.newNetMember(addr, p); if (isCurrentHost) { defaultToCurrentHost(); } }
/** * Create a InternalDistributedMember as defined by the given address. * <p> * * <b> * [bruce]THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> * * @param addr * address of the server * @param p * the listening port of the server * @param isCurrentHost * true if the given host refers to the current host (bridge and * gateway use false to create a temporary id for the OTHER side of a * connection) */ public InternalDistributedMember(InetAddress addr, int p, boolean isCurrentHost) { ipAddr = (JGroupMember)MemberFactory.newNetMember(addr, p); if (isCurrentHost) { defaultToCurrentHost(); } }
/** * Create a InternalDistributedMember referring to the current host (as defined by the given * string).<p> * * <b> * [bruce]THIS METHOD IS FOR TESTING ONLY. DO NOT USE IT TO CREATE IDs FOR * USE IN THE PRODUCT. IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED * FOR P2P FUNCTIONALITY. * </b> * * * @param i * the hostname, must be for the current host * @param p * the membership listening port * @throws UnknownHostException if the given hostname cannot be resolved */ public InternalDistributedMember(String i, int p) throws UnknownHostException { ipAddr = (JGroupMember)MemberFactory.newNetMember(i, p); defaultToCurrentHost(); this.vmKind = DistributionManager.NORMAL_DM_TYPE; GFJGBasicAdapter.insertDefaultGemFireAttributes(ipAddr.getAddress()); }
/** * Create a InternalDistributedMember referring to the current host * (as defined by the given string) with additional info including optional * connection name and an optional unique string. Currently these two * optional fields (and this constructor) are only used by the * LonerDistributionManager.<p> * * < b> * [bruce]DO NOT USE THIS METHOD TO CREATE ANYTHING OTHER THAN A LONER ID * WITHOUT TALKING TO ME FIRST. IT DOES NOT PROPERLY INITIALIZE THE ID. * </b> * * @param i * the hostname, must be for the current host * @param p * the membership listening port * @param n * gemfire properties connection name * @param u * unique string used make the member more unique * @throws UnknownHostException if the given hostname cannot be resolved */ public InternalDistributedMember(String i, int p, String n, String u) throws UnknownHostException { ipAddr = (JGroupMember)MemberFactory.newNetMember(i, p); defaultToCurrentHost(); GFJGBasicAdapter.insertDefaultGemFireAttributes(ipAddr.getAddress()); this.name = n; this.uniqueTag = u; }
InetAddress addr = SocketCreator.toInetAddress(host); netMbr = MemberFactory.newNetMember(addr, p, false, true, Version.CURRENT_ORDINAL, mattr); defaultToCurrentHost(); this.name = n; this.uniqueTag = u;