protected void writeJvmArguments(final DataOutput out) throws IOException { final List<String> jvmArgs = getJvmArgs(); out.writeInt(jvmArgs.size()); for (final String jvmArg : jvmArgs) { out.writeUTF(jvmArg); } }
@Override public String toString() { final StringBuilder buffer = new StringBuilder(getClass().getSimpleName()); buffer.append("{ pid = ").append(getPid()); buffer.append(", uptime = ").append(getUptime()); buffer.append(", workingDirectory = ").append(getWorkingDirectory()); buffer.append(", jvmArgs = ").append(ArgumentRedactor.redact(getJvmArgs())); buffer.append(", classpath = ").append(getClasspath()); buffer.append(", gemfireVersion = ").append(getGemFireVersion()); buffer.append(", javaVersion = ").append(getJavaVersion()); buffer.append("}"); return buffer.toString(); }
private LocatorState(final LocatorLauncher launcher, final Status status, final LocatorStatusResponse response) { this(status, launcher.statusMessage, System.currentTimeMillis(), launcher.getId(), response.getPid(), response.getUptime(), response.getWorkingDirectory(), response.getJvmArgs(), response.getClasspath(), response.getGemFireVersion(), response.getJavaVersion(), response.getLogFile(), response.getHost(), String.valueOf(response.getPort()), response.getName()); }
@Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof LocatorStatusResponse)) { return false; } final LocatorStatusResponse that = (LocatorStatusResponse) obj; return ObjectUtils.equalsIgnoreNull(this.getPid(), that.getPid()) && ObjectUtils.equals(this.getUptime(), that.getUptime()) && ObjectUtils.equals(this.getWorkingDirectory(), that.getWorkingDirectory()) && ObjectUtils.equals(this.getJvmArgs(), that.getJvmArgs()) && ObjectUtils.equals(this.getClasspath(), that.getClasspath()) && ObjectUtils.equals(this.getGemFireVersion(), that.getGemFireVersion()) && ObjectUtils.equals(this.getJavaVersion(), that.getJavaVersion()); }
@Override public int hashCode() { int hashValue = 17; hashValue = 37 * hashValue + ObjectUtils.hashCode(getPid()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getUptime()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getWorkingDirectory()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getJvmArgs()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getClasspath()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getGemFireVersion()); hashValue = 37 * hashValue + ObjectUtils.hashCode(getJavaVersion()); return hashValue; }