/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticache.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Represents a collection of cache nodes in a replication group. One node in the node group is the read/write primary * node. All the other nodes are read-only Replica nodes. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class NodeGroup implements Serializable, Cloneable { /** ** 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 90 * node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node group. *
*/ private String nodeGroupId; /** *
* The current state of this replication group - creating
, available
,
* modifying
, deleting
.
*
* The endpoint of the primary node in this node group (shard). *
*/ private Endpoint primaryEndpoint; /** ** The endpoint of the replica nodes in this node group (shard). *
*/ private Endpoint readerEndpoint; /** ** The keyspace for this node group (shard). *
*/ private String slots; /** ** A list containing information about individual nodes within the node group (shard). *
*/ private com.amazonaws.internal.SdkInternalList* 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 90 * node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node group. *
* * @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 90 node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group. */ public void setNodeGroupId(String nodeGroupId) { this.nodeGroupId = 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 90 * node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node group. *
* * @return 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 90 node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group. */ public String getNodeGroupId() { return this.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 90 * node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node group. *
* * @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 90 node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node * group. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withNodeGroupId(String nodeGroupId) { setNodeGroupId(nodeGroupId); return this; } /** *
* The current state of this replication group - creating
, available
,
* modifying
, deleting
.
*
creating
, available
,
* modifying
, deleting
.
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current state of this replication group - creating
, available
,
* modifying
, deleting
.
*
creating
, available
,
* modifying
, deleting
.
*/
public String getStatus() {
return this.status;
}
/**
*
* The current state of this replication group - creating
, available
,
* modifying
, deleting
.
*
creating
, available
,
* modifying
, deleting
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NodeGroup withStatus(String status) {
setStatus(status);
return this;
}
/**
* * The endpoint of the primary node in this node group (shard). *
* * @param primaryEndpoint * The endpoint of the primary node in this node group (shard). */ public void setPrimaryEndpoint(Endpoint primaryEndpoint) { this.primaryEndpoint = primaryEndpoint; } /** ** The endpoint of the primary node in this node group (shard). *
* * @return The endpoint of the primary node in this node group (shard). */ public Endpoint getPrimaryEndpoint() { return this.primaryEndpoint; } /** ** The endpoint of the primary node in this node group (shard). *
* * @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; } /** ** The endpoint of the replica nodes in this node group (shard). *
* * @param readerEndpoint * The endpoint of the replica nodes in this node group (shard). */ public void setReaderEndpoint(Endpoint readerEndpoint) { this.readerEndpoint = readerEndpoint; } /** ** The endpoint of the replica nodes in this node group (shard). *
* * @return The endpoint of the replica nodes in this node group (shard). */ public Endpoint getReaderEndpoint() { return this.readerEndpoint; } /** ** The endpoint of the replica nodes in this node group (shard). *
* * @param readerEndpoint * The endpoint of the replica nodes in this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroup withReaderEndpoint(Endpoint readerEndpoint) { setReaderEndpoint(readerEndpoint); return this; } /** ** The keyspace for this node group (shard). *
* * @param slots * The keyspace for this node group (shard). */ public void setSlots(String slots) { this.slots = slots; } /** ** The keyspace for this node group (shard). *
* * @return The keyspace for this node group (shard). */ public String getSlots() { return this.slots; } /** ** The keyspace for this node group (shard). *
* * @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; } /** ** A list containing information about individual nodes within the node group (shard). *
* * @return A list containing information about individual nodes within the node group (shard). */ public java.util.List* A list containing information about individual nodes within the node group (shard). *
* * @param nodeGroupMembers * A list containing information about individual nodes within the node group (shard). */ public void setNodeGroupMembers(java.util.Collection* A list containing information about individual nodes within the node group (shard). *
** NOTE: 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. *
* * @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* A list containing information about individual nodes within the node group (shard). *
* * @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