Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client version in cluster state dumps. #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,25 @@ public class PlatformConnectedClient implements Serializable {
public long clientPID;
public String uuid;
public String name;
public String version;

public PlatformConnectedClient() {
// For Serializable.
}

public PlatformConnectedClient(String uuid, String name, InetAddress localAddress, int localPort, InetAddress remoteAddress, int remotePort, long clientPID) {
this(uuid, name, localAddress, localPort, remoteAddress, remotePort, clientPID, "UNKNOWN");
}

public PlatformConnectedClient(String uuid, String name, InetAddress localAddress, int localPort, InetAddress remoteAddress, int remotePort, long clientPID, String version) {
this.uuid = uuid;
this.name = name;
this.localAddress = localAddress;
this.localPort = localPort;
this.remoteAddress = remoteAddress;
this.remotePort = remotePort;
this.clientPID = clientPID;
this.version = version;
}

@Override
Expand All @@ -63,6 +69,7 @@ public String toString() {
sb.append(", remotePort=").append(remotePort);
sb.append(", uuid='").append(uuid).append('\'');
sb.append(", name='").append(name).append('\'');
sb.append(", version='").append(version).append('\'');
sb.append('}');
return sb.toString();
}
Expand All @@ -75,7 +82,8 @@ public int hashCode() {
^ remotePort
^ (int)clientPID
^ this.uuid.hashCode()
^ this.name.hashCode();
^ this.name.hashCode()
^ this.version.hashCode();
}

@Override
Expand All @@ -90,7 +98,8 @@ public boolean equals(Object other) {
&& (this.remotePort == that.remotePort)
&& (this.clientPID == that.clientPID)
&& this.uuid.equals(that.uuid)
&& this.name.equals(that.name);
&& this.name.equals(that.name)
&& this.version.equals(that.version);
}
return doesMatch;
}
Expand Down