@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; }
/** * <p> * The ID of the cluster to which the node belongs. * </p> * * @param cacheClusterId * The ID of the cluster to which the node belongs. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCacheClusterId(String cacheClusterId) { setCacheClusterId(cacheClusterId); return this; }
/** * <p> * The ID of the node within its cluster. A node ID is a numeric identifier (0001, 0002, etc.). * </p> * * @param cacheNodeId * The ID of the node within its cluster. A node ID is a numeric identifier (0001, 0002, etc.). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCacheNodeId(String cacheNodeId) { setCacheNodeId(cacheNodeId); return this; }
public NodeGroupMember unmarshall(StaxUnmarshallerContext context) throws Exception { NodeGroupMember nodeGroupMember = new NodeGroupMember(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; nodeGroupMember.setCacheClusterId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setCacheNodeId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setReadEndpoint(EndpointStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setPreferredAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setCurrentRole(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
this.snapshotWindow = cacheCluster.getSnapshotWindow(); if (nodeGroupMember != null) { this.endpoint = nodeGroupMember.getReadEndpoint(); this.currentRole = nodeGroupMember.getCurrentRole(); } else { this.endpoint = cacheCluster.getConfigurationEndpoint();
for (NodeGroup nodeGroup: replicationGroup.getNodeGroups()) { for (NodeGroupMember nodeGroupMember: nodeGroup.getNodeGroupMembers()) { clusterIdToNodeGroupMember.put(nodeGroupMember.getCacheClusterId(), nodeGroupMember);
/** * <p> * The name of the Availability Zone in which the node is located. * </p> * * @param preferredAvailabilityZone * The name of the Availability Zone in which the node is located. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withPreferredAvailabilityZone(String preferredAvailabilityZone) { setPreferredAvailabilityZone(preferredAvailabilityZone); return this; }
/** * <p> * The role that is currently assigned to the node - <code>primary</code> or <code>replica</code>. This member is * only applicable for Redis (cluster mode disabled) replication groups. * </p> * * @param currentRole * The role that is currently assigned to the node - <code>primary</code> or <code>replica</code>. This * member is only applicable for Redis (cluster mode disabled) replication groups. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCurrentRole(String currentRole) { setCurrentRole(currentRole); return this; }
public NodeGroupMember unmarshall(StaxUnmarshallerContext context) throws Exception { NodeGroupMember nodeGroupMember = new NodeGroupMember(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; nodeGroupMember.setCacheClusterId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setCacheNodeId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setReadEndpoint(EndpointStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setPreferredAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroupMember.setCurrentRole(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * The name of the Availability Zone in which the node is located. * </p> * * @param preferredAvailabilityZone * The name of the Availability Zone in which the node is located. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withPreferredAvailabilityZone(String preferredAvailabilityZone) { setPreferredAvailabilityZone(preferredAvailabilityZone); return this; }
/** * <p> * The role that is currently assigned to the node - <code>primary</code> or <code>replica</code>. This member is * only applicable for Redis (cluster mode disabled) replication groups. * </p> * * @param currentRole * The role that is currently assigned to the node - <code>primary</code> or <code>replica</code>. This * member is only applicable for Redis (cluster mode disabled) replication groups. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCurrentRole(String currentRole) { setCurrentRole(currentRole); return this; }
return false; NodeGroupMember other = (NodeGroupMember) obj; if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == null) return false; if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == false) return false; if (other.getCacheNodeId() == null ^ this.getCacheNodeId() == null) return false; 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) return false; if (other.getPreferredAvailabilityZone() != null && other.getPreferredAvailabilityZone().equals(this.getPreferredAvailabilityZone()) == false) return false; if (other.getCurrentRole() == null ^ this.getCurrentRole() == null) return false; if (other.getCurrentRole() != null && other.getCurrentRole().equals(this.getCurrentRole()) == false) return false; return true;
/** * <p> * The ID of the node within its cluster. A node ID is a numeric identifier (0001, 0002, etc.). * </p> * * @param cacheNodeId * The ID of the node within its cluster. A node ID is a numeric identifier (0001, 0002, etc.). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCacheNodeId(String cacheNodeId) { setCacheNodeId(cacheNodeId); return this; }
/** * <p> * The ID of the cluster to which the node belongs. * </p> * * @param cacheClusterId * The ID of the cluster to which the node belongs. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupMember withCacheClusterId(String cacheClusterId) { setCacheClusterId(cacheClusterId); return this; }
/** * 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; }
return false; NodeGroupMember other = (NodeGroupMember) obj; if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == null) return false; if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == false) return false; if (other.getCacheNodeId() == null ^ this.getCacheNodeId() == null) return false; 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) return false; if (other.getPreferredAvailabilityZone() != null && other.getPreferredAvailabilityZone().equals(this.getPreferredAvailabilityZone()) == false) return false; if (other.getCurrentRole() == null ^ this.getCurrentRole() == null) return false; if (other.getCurrentRole() != null && other.getCurrentRole().equals(this.getCurrentRole()) == 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 (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(); }