/** * 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 (getCacheNodeId() != null) sb.append("CacheNodeId: ").append(getCacheNodeId()).append(","); if (getCacheNodeStatus() != null) sb.append("CacheNodeStatus: ").append(getCacheNodeStatus()).append(","); if (getCacheNodeCreateTime() != null) sb.append("CacheNodeCreateTime: ").append(getCacheNodeCreateTime()).append(","); if (getEndpoint() != null) sb.append("Endpoint: ").append(getEndpoint()).append(","); if (getParameterGroupStatus() != null) sb.append("ParameterGroupStatus: ").append(getParameterGroupStatus()).append(","); if (getSourceCacheNodeId() != null) sb.append("SourceCacheNodeId: ").append(getSourceCacheNodeId()).append(","); if (getCustomerAvailabilityZone() != null) sb.append("CustomerAvailabilityZone: ").append(getCustomerAvailabilityZone()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCacheNodeId() == null) ? 0 : getCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getCacheNodeStatus() == null) ? 0 : getCacheNodeStatus().hashCode()); hashCode = prime * hashCode + ((getCacheNodeCreateTime() == null) ? 0 : getCacheNodeCreateTime().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getParameterGroupStatus() == null) ? 0 : getParameterGroupStatus().hashCode()); hashCode = prime * hashCode + ((getSourceCacheNodeId() == null) ? 0 : getSourceCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getCustomerAvailabilityZone() == null) ? 0 : getCustomerAvailabilityZone().hashCode()); return hashCode; }
if (other.getCacheNodeCreateTime() != null && other.getCacheNodeCreateTime().equals(this.getCacheNodeCreateTime()) == false) return false; if (other.getEndpoint() == null ^ this.getEndpoint() == null) return false; if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false) return false; if (other.getParameterGroupStatus() == null ^ this.getParameterGroupStatus() == null)
private static Endpoint getEndpointForCache(CacheCluster cacheCluster) { if (cacheCluster.getConfigurationEndpoint() != null) { return cacheCluster.getConfigurationEndpoint(); } if (!cacheCluster.getCacheNodes().isEmpty()) { return cacheCluster.getCacheNodes().get(0).getEndpoint(); } throw new IllegalArgumentException("No Configuration Endpoint or Cache Node available to " + "receive address information for cluster:'" + cacheCluster.getCacheClusterId() + "'"); } }
private static Endpoint getEndpointForCache(CacheCluster cacheCluster) { if (cacheCluster.getConfigurationEndpoint() != null) { return cacheCluster.getConfigurationEndpoint(); } if (!cacheCluster.getCacheNodes().isEmpty()) { return cacheCluster.getCacheNodes().get(0).getEndpoint(); } throw new IllegalArgumentException("No Configuration Endpoint or Cache Node available to " + "receive address information for cluster:'" + cacheCluster.getCacheClusterId() + "'"); } }
/** * 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 (getCacheNodeId() != null) sb.append("CacheNodeId: ").append(getCacheNodeId()).append(","); if (getCacheNodeStatus() != null) sb.append("CacheNodeStatus: ").append(getCacheNodeStatus()).append(","); if (getCacheNodeCreateTime() != null) sb.append("CacheNodeCreateTime: ").append(getCacheNodeCreateTime()).append(","); if (getEndpoint() != null) sb.append("Endpoint: ").append(getEndpoint()).append(","); if (getParameterGroupStatus() != null) sb.append("ParameterGroupStatus: ").append(getParameterGroupStatus()).append(","); if (getSourceCacheNodeId() != null) sb.append("SourceCacheNodeId: ").append(getSourceCacheNodeId()).append(","); if (getCustomerAvailabilityZone() != null) sb.append("CustomerAvailabilityZone: ").append(getCustomerAvailabilityZone()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCacheNodeId() == null) ? 0 : getCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getCacheNodeStatus() == null) ? 0 : getCacheNodeStatus().hashCode()); hashCode = prime * hashCode + ((getCacheNodeCreateTime() == null) ? 0 : getCacheNodeCreateTime().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getParameterGroupStatus() == null) ? 0 : getParameterGroupStatus().hashCode()); hashCode = prime * hashCode + ((getSourceCacheNodeId() == null) ? 0 : getSourceCacheNodeId().hashCode()); hashCode = prime * hashCode + ((getCustomerAvailabilityZone() == null) ? 0 : getCustomerAvailabilityZone().hashCode()); return hashCode; }
if (other.getCacheNodeCreateTime() != null && other.getCacheNodeCreateTime().equals(this.getCacheNodeCreateTime()) == false) return false; if (other.getEndpoint() == null ^ this.getEndpoint() == null) return false; if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false) return false; if (other.getParameterGroupStatus() == null ^ this.getParameterGroupStatus() == null)