@Override public List<InternalDistributedMember> getViewMembers() { return membershipManager.getView().getMembers(); }
/** this reads an ID written with writeEssentialData */ public static InternalDistributedMember readEssentialData(DataInput in) throws IOException, ClassNotFoundException { final InternalDistributedMember mbr = new InternalDistributedMember(); mbr._readEssentialData(in); return mbr; }
@Override public String toString() { if (this.isShortForm) { return "FindCoordinatorResponse(coordinator=" + coordinator + ")"; } else { return "FindCoordinatorResponse(coordinator=" + coordinator + ", fromView=" + fromView + ", viewId=" + (view == null ? "null" : view.getViewId()) + ", registrants=" + (registrants == null ? "none" : registrants) + ", senderId=" + senderId + ", network partition detection enabled=" + this.networkPartitionDetectionEnabled + ", locators preferred as coordinators=" + this.usePreferredCoordinators + ")"; } }
@Override public boolean isInitialImageProvider(DistributedMember mbr) { return (this.initialImageProvider != null) && (mbr != null) && this.initialImageProvider.equals(mbr); }
@Override public int hashCode() { int result = 17; result = 37 * result + msgId; result = 37 * result + console.hashCode(); return result; } }
@Override public String toString() { return mbr.toString(); } });
public InternalDistributedMember getLeadMember() { for (InternalDistributedMember mbr : this.members) { if (mbr.getVmKind() == ClusterDistributionManager.NORMAL_DM_TYPE) { return mbr; } } return null; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } // GemStone fix for 29125 if ((obj == null) || !(obj instanceof InternalDistributedMember)) { return false; } return compareTo((InternalDistributedMember) obj) == 0; }
/** * Return the underlying port (membership port) * * @return the underlying membership port */ public int getPort() { return netMbr.getPort(); }
/** * ARB: Called by Connection before handshake reply is sent. Returns true if member is part of * view, false if membership is not confirmed before timeout. */ public boolean waitForMembershipCheck(InternalDistributedMember remoteId) { return membershipManager.waitForNewMember(remoteId); } }
/** * Return a new NetMember representing current host * * @param s a String referring to the current host * @param p the membership port being used * @return the new member */ public static NetMember newNetMember(String s, int p) { return services.newNetMember(s, p); }
/** * currently this is a test method but it ought to be used by InternalLocator to create the peer * location TcpHandler */ public static NetLocator newLocatorHandler(InetAddress bindAddress, String locatorString, boolean usePreferredCoordinators, boolean networkPartitionDetectionEnabled, LocatorStats stats, String securityUDPDHAlgo) { return services.newLocatorHandler(bindAddress, locatorString, usePreferredCoordinators, networkPartitionDetectionEnabled, stats, securityUDPDHAlgo); }
/** * [GemStone] Set the direct channel port */ public void setDirectChannelPort(int p) { netMbr.setDirectPort(p); }
/** * Returns the port on which the direct channel runs */ public int getDirectChannelPort() { assert !this.isPartial; return netMbr.getDirectPort(); }
/** * Returns the membership view ID that this member was born in. For backward compatibility reasons * this is limited to 16 bits. */ public int getVmViewId() { return netMbr.getVmViewId(); }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof RemoteGemFireVM) { return this.id.equals(((RemoteGemFireVM) object).id); } return false; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + this.bucketId; result = prime * result + ((this.targetMember == null) ? 0 : this.targetMember.hashCode()); return result; }
@Override public boolean equals(Object obj) { InternalDistributedMember other = ((InternalDistributedMemberWrapper) obj).mbr; return mbr.compareTo(other, false, false) == 0; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TXId)) { return false; } TXId otx = (TXId) o; return (otx.uniqId == this.uniqId && ((otx.memberId == null && this.memberId == null) || (otx.memberId != null && this.memberId != null && otx.memberId.equals(this.memberId)))); }