/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getEvents() != null) sb.append("Events: ").append(getEvents()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getInstanceState() != null) sb.append("InstanceState: ").append(getInstanceState()).append(","); if (getInstanceStatus() != null) sb.append("InstanceStatus: ").append(getInstanceStatus()).append(","); if (getSystemStatus() != null) sb.append("SystemStatus: ").append(getSystemStatus()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getInstanceState() == null) ? 0 : getInstanceState().hashCode()); hashCode = prime * hashCode + ((getInstanceStatus() == null) ? 0 : getInstanceStatus().hashCode()); hashCode = prime * hashCode + ((getSystemStatus() == null) ? 0 : getSystemStatus().hashCode()); return hashCode; }
if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getInstanceState() == null ^ this.getInstanceState() == null)
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: " + getAvailabilityZone() + ","); if (getEvents() != null) sb.append("Events: " + getEvents() + ","); if (getInstanceState() != null) sb.append("InstanceState: " + getInstanceState() + ","); if (getSystemStatus() != null) sb.append("SystemStatus: " + getSystemStatus() + ","); if (getInstanceStatus() != null) sb.append("InstanceStatus: " + getInstanceStatus() ); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); hashCode = prime * hashCode + ((getInstanceState() == null) ? 0 : getInstanceState().hashCode()); hashCode = prime * hashCode + ((getSystemStatus() == null) ? 0 : getSystemStatus().hashCode()); hashCode = prime * hashCode + ((getInstanceStatus() == null) ? 0 : getInstanceStatus().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceStatus == false) return false; InstanceStatus other = (InstanceStatus)obj; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getEvents() == null ^ this.getEvents() == null) return false; if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == false) return false; if (other.getInstanceState() == null ^ this.getInstanceState() == null) return false; if (other.getInstanceState() != null && other.getInstanceState().equals(this.getInstanceState()) == false) return false; if (other.getSystemStatus() == null ^ this.getSystemStatus() == null) return false; if (other.getSystemStatus() != null && other.getSystemStatus().equals(this.getSystemStatus()) == false) return false; if (other.getInstanceStatus() == null ^ this.getInstanceStatus() == null) return false; if (other.getInstanceStatus() != null && other.getInstanceStatus().equals(this.getInstanceStatus()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getEvents() != null) sb.append("Events: ").append(getEvents()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getInstanceState() != null) sb.append("InstanceState: ").append(getInstanceState()).append(","); if (getInstanceStatus() != null) sb.append("InstanceStatus: ").append(getInstanceStatus()).append(","); if (getSystemStatus() != null) sb.append("SystemStatus: ").append(getSystemStatus()); sb.append("}"); return sb.toString(); }
idToInstanceStatus.put(status.getInstanceId(), status);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getInstanceState() == null) ? 0 : getInstanceState().hashCode()); hashCode = prime * hashCode + ((getInstanceStatus() == null) ? 0 : getInstanceStatus().hashCode()); hashCode = prime * hashCode + ((getSystemStatus() == null) ? 0 : getSystemStatus().hashCode()); return hashCode; }
sb.append("\tid:"+status.getInstanceId() + "\taz:" + status.getAvailabilityZone() + "\tstate:" + status.getInstanceState().getName() + impairedInstances.add(status.getInstanceId());
if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getInstanceState() == null ^ this.getInstanceState() == null)
allInitialized = true; for (final InstanceStatus instanceStatus : describeInstanceStatus.getInstanceStatuses()) { System.out.format("%s %s%n", instanceStatus.getInstanceId(), instanceStatus.getInstanceStatus().getStatus()); if (!instanceStatus.getInstanceStatus().getStatus().equals("ok")) { allInitialized = false;