/** * 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 (getCacheClusterId() != null) sb.append("CacheClusterId: ").append(getCacheClusterId()).append(","); if (getCacheNodeId() != null) sb.append("CacheNodeId: ").append(getCacheNodeId()).append(","); if (getReadEndpoint() != null) sb.append("ReadEndpoint: ").append(getReadEndpoint()).append(","); if (getPreferredAvailabilityZone() != null) sb.append("PreferredAvailabilityZone: ").append(getPreferredAvailabilityZone()).append(","); if (getCurrentRole() != null) sb.append("CurrentRole: ").append(getCurrentRole()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode()); hashCode = prime * hashCode + ((getCacheNodeId() == null) ? 0 : getCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getReadEndpoint() == null) ? 0 : getReadEndpoint().hashCode()); hashCode = prime * hashCode + ((getPreferredAvailabilityZone() == null) ? 0 : getPreferredAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getCurrentRole() == null) ? 0 : getCurrentRole().hashCode()); return hashCode; }
if (other.getCacheNodeId() != null && other.getCacheNodeId().equals(this.getCacheNodeId()) == false) return false; if (other.getReadEndpoint() == null ^ this.getReadEndpoint() == null) return false; if (other.getReadEndpoint() != null && other.getReadEndpoint().equals(this.getReadEndpoint()) == false) return false; if (other.getPreferredAvailabilityZone() == null ^ this.getPreferredAvailabilityZone() == null)
/** * 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 (getCacheClusterId() != null) sb.append("CacheClusterId: ").append(getCacheClusterId()).append(","); if (getCacheNodeId() != null) sb.append("CacheNodeId: ").append(getCacheNodeId()).append(","); if (getReadEndpoint() != null) sb.append("ReadEndpoint: ").append(getReadEndpoint()).append(","); if (getPreferredAvailabilityZone() != null) sb.append("PreferredAvailabilityZone: ").append(getPreferredAvailabilityZone()).append(","); if (getCurrentRole() != null) sb.append("CurrentRole: ").append(getCurrentRole()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode()); hashCode = prime * hashCode + ((getCacheNodeId() == null) ? 0 : getCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getReadEndpoint() == null) ? 0 : getReadEndpoint().hashCode()); hashCode = prime * hashCode + ((getPreferredAvailabilityZone() == null) ? 0 : getPreferredAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getCurrentRole() == null) ? 0 : getCurrentRole().hashCode()); return hashCode; }
if (other.getCacheNodeId() != null && other.getCacheNodeId().equals(this.getCacheNodeId()) == false) return false; if (other.getReadEndpoint() == null ^ this.getReadEndpoint() == null) return false; if (other.getReadEndpoint() != null && other.getReadEndpoint().equals(this.getReadEndpoint()) == false) return false; if (other.getPreferredAvailabilityZone() == null ^ this.getPreferredAvailabilityZone() == null)
this.snapshotWindow = cacheCluster.getSnapshotWindow(); if (nodeGroupMember != null) { this.endpoint = nodeGroupMember.getReadEndpoint(); this.currentRole = nodeGroupMember.getCurrentRole(); } else {