StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCacheClusterId() != null) sb.append("CacheClusterId: ").append(getCacheClusterId()).append(","); if (getConfigurationEndpoint() != null) sb.append("ConfigurationEndpoint: ").append(getConfigurationEndpoint()).append(",");
int hashCode = 1; hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode()); hashCode = prime * hashCode + ((getConfigurationEndpoint() == null) ? 0 : getConfigurationEndpoint().hashCode()); hashCode = prime * hashCode + ((getClientDownloadLandingPage() == null) ? 0 : getClientDownloadLandingPage().hashCode());
return false; CacheCluster other = (CacheCluster) obj; if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == null) return false; if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == false) return false; if (other.getConfigurationEndpoint() == null ^ this.getConfigurationEndpoint() == 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() + "'"); } }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCacheClusterId() != null) sb.append("CacheClusterId: ").append(getCacheClusterId()).append(","); if (getConfigurationEndpoint() != null) sb.append("ConfigurationEndpoint: ").append(getConfigurationEndpoint()).append(",");
Map<String,List<CacheCluster>> cacheMap = cacheClusterList.stream().collect(Collectors.groupingBy(cluster-> cluster.getReplicationGroupId()!=null?cluster.getReplicationGroupId():cluster.getCacheClusterId())); Map<String,ReplicationGroup> replGrpMap = replicationGroupList.stream().collect(Collectors.toMap(rplGrp -> rplGrp.getReplicationGroupId(),rplGrp->rplGrp)); endPoint = cluster.getCacheNodes().stream().map(CacheNode::getEndpoint).findAny().get(); elastiCacheVH.setPrimaryOrConfigEndpoint(endPoint.getAddress().replaceAll(cluster.getCacheClusterId(), clusterName)+":"+endPoint.getPort());
int hashCode = 1; hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode()); hashCode = prime * hashCode + ((getConfigurationEndpoint() == null) ? 0 : getConfigurationEndpoint().hashCode()); hashCode = prime * hashCode + ((getClientDownloadLandingPage() == null) ? 0 : getClientDownloadLandingPage().hashCode());
elasticacheClusterBuilder.putAll(regionName, new ElasticacheCluster(cluster, clusterIdToNodeGroupMember.get(cluster.getCacheClusterId()))); cntClusters++;
cacheVH.setArn(String.format(arnTemplate, region.getName(),account,cacheVH.getClusterName())); cacheVH.setTags(amazonElastiCache.listTagsForResource(new com.amazonaws.services.elasticache.model.ListTagsForResourceRequest(). withResourceName(String.format(arnTemplate, region.getName(),account,cacheVH.getCluster().getCacheClusterId() ))).getTagList());
public ElasticacheCluster(CacheCluster cacheCluster, NodeGroupMember nodeGroupMember) { this.cacheClusterId = cacheCluster.getCacheClusterId(); this.clientDownloadLandingPage = cacheCluster.getClientDownloadLandingPage(); this.cacheNodeType = cacheCluster.getCacheNodeType();
return false; CacheCluster other = (CacheCluster) obj; if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == null) return false; if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == false) return false; if (other.getConfigurationEndpoint() == null ^ this.getConfigurationEndpoint() == null)