@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNodeGroupId() == null) ? 0 : getNodeGroupId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getPrimaryEndpoint() == null) ? 0 : getPrimaryEndpoint().hashCode()); hashCode = prime * hashCode + ((getSlots() == null) ? 0 : getSlots().hashCode()); hashCode = prime * hashCode + ((getNodeGroupMembers() == null) ? 0 : getNodeGroupMembers().hashCode()); return hashCode; }
/** * <p> * The identifier for the node group (shard). A Redis (cluster mode disabled) replication group contains only 1 node * group; therefore, the node group ID is 0001. A Redis (cluster mode enabled) replication group contains 1 to 15 * node groups numbered 0001 to 0015. * </p> * * @param nodeGroupId * The identifier for the node group (shard). A Redis (cluster mode disabled) replication group contains only * 1 node group; therefore, the node group ID is 0001. A Redis (cluster mode enabled) replication group * contains 1 to 15 node groups numbered 0001 to 0015. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupId(String nodeGroupId) { setNodeGroupId(nodeGroupId); return this; }
/** * <p> * A list containing information about individual nodes within the node group (shard). * </p> * * @param nodeGroupMembers * A list containing information about individual nodes within the node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupMembers(java.util.Collection<NodeGroupMember> nodeGroupMembers) { setNodeGroupMembers(nodeGroupMembers); return this; }
public NodeGroup unmarshall(StaxUnmarshallerContext context) throws Exception { NodeGroup nodeGroup = new NodeGroup(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; nodeGroup.setNodeGroupId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setPrimaryEndpoint(EndpointStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setSlots(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.withNodeGroupMembers(new ArrayList<NodeGroupMember>()); continue; nodeGroup.withNodeGroupMembers(NodeGroupMemberStaxUnmarshaller.getInstance().unmarshall(context)); continue;
endPoint = rplGrp.getConfigurationEndpoint(); if(endPoint==null){ endPoint = rplGrp.getNodeGroups().stream().filter(obj->obj.getPrimaryEndpoint()!=null).map(obj-> obj.getPrimaryEndpoint()).findAny().get();
for (NodeGroupMember nodeGroupMember: nodeGroup.getNodeGroupMembers()) { clusterIdToNodeGroupMember.put(nodeGroupMember.getCacheClusterId(), nodeGroupMember);
/** * <p> * The endpoint of the primary node in this node group (shard). * </p> * * @param primaryEndpoint * The endpoint of the primary node in this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withPrimaryEndpoint(Endpoint primaryEndpoint) { setPrimaryEndpoint(primaryEndpoint); return this; }
/** * <p> * The keyspace for this node group (shard). * </p> * * @param slots * The keyspace for this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withSlots(String slots) { setSlots(slots); return this; }
public NodeGroup unmarshall(StaxUnmarshallerContext context) throws Exception { NodeGroup nodeGroup = new NodeGroup(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; nodeGroup.setNodeGroupId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setPrimaryEndpoint(EndpointStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.setSlots(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; nodeGroup.withNodeGroupMembers(new ArrayList<NodeGroupMember>()); continue; nodeGroup.withNodeGroupMembers(NodeGroupMemberStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * The endpoint of the primary node in this node group (shard). * </p> * * @param primaryEndpoint * The endpoint of the primary node in this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withPrimaryEndpoint(Endpoint primaryEndpoint) { setPrimaryEndpoint(primaryEndpoint); return this; }
/** * <p> * The keyspace for this node group (shard). * </p> * * @param slots * The keyspace for this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withSlots(String slots) { setSlots(slots); return this; }
return false; NodeGroup other = (NodeGroup) obj; if (other.getNodeGroupId() == null ^ this.getNodeGroupId() == null) return false; if (other.getNodeGroupId() != null && other.getNodeGroupId().equals(this.getNodeGroupId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getPrimaryEndpoint() == null ^ this.getPrimaryEndpoint() == null) return false; if (other.getPrimaryEndpoint() != null && other.getPrimaryEndpoint().equals(this.getPrimaryEndpoint()) == false) return false; if (other.getSlots() == null ^ this.getSlots() == null) return false; if (other.getSlots() != null && other.getSlots().equals(this.getSlots()) == false) return false; if (other.getNodeGroupMembers() == null ^ this.getNodeGroupMembers() == null) return false; if (other.getNodeGroupMembers() != null && other.getNodeGroupMembers().equals(this.getNodeGroupMembers()) == false) return false; return true;
/** * <p> * A list containing information about individual nodes within the node group (shard). * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setNodeGroupMembers(java.util.Collection)} or {@link #withNodeGroupMembers(java.util.Collection)} if you * want to override the existing values. * </p> * * @param nodeGroupMembers * A list containing information about individual nodes within the node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupMembers(NodeGroupMember... nodeGroupMembers) { if (this.nodeGroupMembers == null) { setNodeGroupMembers(new com.amazonaws.internal.SdkInternalList<NodeGroupMember>(nodeGroupMembers.length)); } for (NodeGroupMember ele : nodeGroupMembers) { this.nodeGroupMembers.add(ele); } return this; }
/** * <p> * The identifier for the node group (shard). A Redis (cluster mode disabled) replication group contains only 1 node * group; therefore, the node group ID is 0001. A Redis (cluster mode enabled) replication group contains 1 to 15 * node groups numbered 0001 to 0015. * </p> * * @param nodeGroupId * The identifier for the node group (shard). A Redis (cluster mode disabled) replication group contains only * 1 node group; therefore, the node group ID is 0001. A Redis (cluster mode enabled) replication group * contains 1 to 15 node groups numbered 0001 to 0015. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupId(String nodeGroupId) { setNodeGroupId(nodeGroupId); 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 (getNodeGroupId() != null) sb.append("NodeGroupId: ").append(getNodeGroupId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getPrimaryEndpoint() != null) sb.append("PrimaryEndpoint: ").append(getPrimaryEndpoint()).append(","); if (getSlots() != null) sb.append("Slots: ").append(getSlots()).append(","); if (getNodeGroupMembers() != null) sb.append("NodeGroupMembers: ").append(getNodeGroupMembers()); sb.append("}"); return sb.toString(); }
/** * <p> * A list containing information about individual nodes within the node group (shard). * </p> * * @param nodeGroupMembers * A list containing information about individual nodes within the node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupMembers(java.util.Collection<NodeGroupMember> nodeGroupMembers) { setNodeGroupMembers(nodeGroupMembers); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNodeGroupId() == null) ? 0 : getNodeGroupId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getPrimaryEndpoint() == null) ? 0 : getPrimaryEndpoint().hashCode()); hashCode = prime * hashCode + ((getSlots() == null) ? 0 : getSlots().hashCode()); hashCode = prime * hashCode + ((getNodeGroupMembers() == null) ? 0 : getNodeGroupMembers().hashCode()); return hashCode; }
/** * <p> * A list containing information about individual nodes within the node group (shard). * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setNodeGroupMembers(java.util.Collection)} or {@link #withNodeGroupMembers(java.util.Collection)} if you * want to override the existing values. * </p> * * @param nodeGroupMembers * A list containing information about individual nodes within the node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupMembers(NodeGroupMember... nodeGroupMembers) { if (this.nodeGroupMembers == null) { setNodeGroupMembers(new com.amazonaws.internal.SdkInternalList<NodeGroupMember>(nodeGroupMembers.length)); } for (NodeGroupMember ele : nodeGroupMembers) { this.nodeGroupMembers.add(ele); } return this; }
return false; NodeGroup other = (NodeGroup) obj; if (other.getNodeGroupId() == null ^ this.getNodeGroupId() == null) return false; if (other.getNodeGroupId() != null && other.getNodeGroupId().equals(this.getNodeGroupId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getPrimaryEndpoint() == null ^ this.getPrimaryEndpoint() == null) return false; if (other.getPrimaryEndpoint() != null && other.getPrimaryEndpoint().equals(this.getPrimaryEndpoint()) == false) return false; if (other.getSlots() == null ^ this.getSlots() == null) return false; if (other.getSlots() != null && other.getSlots().equals(this.getSlots()) == false) return false; if (other.getNodeGroupMembers() == null ^ this.getNodeGroupMembers() == null) return false; if (other.getNodeGroupMembers() != null && other.getNodeGroupMembers().equals(this.getNodeGroupMembers()) == 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 (getNodeGroupId() != null) sb.append("NodeGroupId: ").append(getNodeGroupId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getPrimaryEndpoint() != null) sb.append("PrimaryEndpoint: ").append(getPrimaryEndpoint()).append(","); if (getSlots() != null) sb.append("Slots: ").append(getSlots()).append(","); if (getNodeGroupMembers() != null) sb.append("NodeGroupMembers: ").append(getNodeGroupMembers()); sb.append("}"); return sb.toString(); }