/* * 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; /** *
* Node group (shard) configuration options. Each node group (shard) configuration has the following: Slots
, PrimaryAvailabilityZone
, ReplicaAvailabilityZones
, ReplicaCount
.
*
* Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration * values apply to. *
*/ private String nodeGroupId; /** *
* A string that specifies the keyspace for a particular node group. Keyspaces range from 0 to 16,383. The string is
* in the format startkey-endkey
.
*
* Example: "0-3999"
*
* The number of read replica nodes in this node group (shard). *
*/ private Integer replicaCount; /** ** The Availability Zone where the primary node of this node group (shard) is launched. *
*/ private String primaryAvailabilityZone; /** *
* A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must
* match the value of ReplicaCount
or ReplicasPerNodeGroup
if not specified.
*
* The outpost ARN of the primary node. *
*/ private String primaryOutpostArn; /** ** The outpost ARN of the node replicas. *
*/ private com.amazonaws.internal.SdkInternalList* Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration * values apply to. *
* * @param nodeGroupId * Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these * configuration values apply to. */ public void setNodeGroupId(String nodeGroupId) { this.nodeGroupId = nodeGroupId; } /** ** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration * values apply to. *
* * @return Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these * configuration values apply to. */ public String getNodeGroupId() { return this.nodeGroupId; } /** ** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration * values apply to. *
* * @param nodeGroupId * Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these * configuration values apply to. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withNodeGroupId(String nodeGroupId) { setNodeGroupId(nodeGroupId); return this; } /** *
* A string that specifies the keyspace for a particular node group. Keyspaces range from 0 to 16,383. The string is
* in the format startkey-endkey
.
*
* Example: "0-3999"
*
startkey-endkey
.
*
* Example: "0-3999"
*/
public void setSlots(String slots) {
this.slots = slots;
}
/**
*
* A string that specifies the keyspace for a particular node group. Keyspaces range from 0 to 16,383. The string is
* in the format startkey-endkey
.
*
* Example: "0-3999"
*
startkey-endkey
.
*
* Example: "0-3999"
*/
public String getSlots() {
return this.slots;
}
/**
*
* A string that specifies the keyspace for a particular node group. Keyspaces range from 0 to 16,383. The string is
* in the format startkey-endkey
.
*
* Example: "0-3999"
*
startkey-endkey
.
*
* Example: "0-3999"
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NodeGroupConfiguration withSlots(String slots) {
setSlots(slots);
return this;
}
/**
*
* The number of read replica nodes in this node group (shard). *
* * @param replicaCount * The number of read replica nodes in this node group (shard). */ public void setReplicaCount(Integer replicaCount) { this.replicaCount = replicaCount; } /** ** The number of read replica nodes in this node group (shard). *
* * @return The number of read replica nodes in this node group (shard). */ public Integer getReplicaCount() { return this.replicaCount; } /** ** The number of read replica nodes in this node group (shard). *
* * @param replicaCount * The number of read replica nodes in this node group (shard). * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withReplicaCount(Integer replicaCount) { setReplicaCount(replicaCount); return this; } /** ** The Availability Zone where the primary node of this node group (shard) is launched. *
* * @param primaryAvailabilityZone * The Availability Zone where the primary node of this node group (shard) is launched. */ public void setPrimaryAvailabilityZone(String primaryAvailabilityZone) { this.primaryAvailabilityZone = primaryAvailabilityZone; } /** ** The Availability Zone where the primary node of this node group (shard) is launched. *
* * @return The Availability Zone where the primary node of this node group (shard) is launched. */ public String getPrimaryAvailabilityZone() { return this.primaryAvailabilityZone; } /** ** The Availability Zone where the primary node of this node group (shard) is launched. *
* * @param primaryAvailabilityZone * The Availability Zone where the primary node of this node group (shard) is launched. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withPrimaryAvailabilityZone(String primaryAvailabilityZone) { setPrimaryAvailabilityZone(primaryAvailabilityZone); return this; } /** *
* A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must
* match the value of ReplicaCount
or ReplicasPerNodeGroup
if not specified.
*
ReplicaCount
or ReplicasPerNodeGroup
if not
* specified.
*/
public java.util.List
* A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must
* match the value of ReplicaCount
or ReplicasPerNodeGroup
if not specified.
*
ReplicaCount
or ReplicasPerNodeGroup
if not
* specified.
*/
public void setReplicaAvailabilityZones(java.util.Collection
* A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must
* match the value of ReplicaCount
or ReplicasPerNodeGroup
if not specified.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setReplicaAvailabilityZones(java.util.Collection)} or * {@link #withReplicaAvailabilityZones(java.util.Collection)} if you want to override the existing values. *
* * @param replicaAvailabilityZones * A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this * list must match the value ofReplicaCount
or ReplicasPerNodeGroup
if not
* specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NodeGroupConfiguration withReplicaAvailabilityZones(String... replicaAvailabilityZones) {
if (this.replicaAvailabilityZones == null) {
setReplicaAvailabilityZones(new com.amazonaws.internal.SdkInternalList
* A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must
* match the value of ReplicaCount
or ReplicasPerNodeGroup
if not specified.
*
ReplicaCount
or ReplicasPerNodeGroup
if not
* specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NodeGroupConfiguration withReplicaAvailabilityZones(java.util.Collection* The outpost ARN of the primary node. *
* * @param primaryOutpostArn * The outpost ARN of the primary node. */ public void setPrimaryOutpostArn(String primaryOutpostArn) { this.primaryOutpostArn = primaryOutpostArn; } /** ** The outpost ARN of the primary node. *
* * @return The outpost ARN of the primary node. */ public String getPrimaryOutpostArn() { return this.primaryOutpostArn; } /** ** The outpost ARN of the primary node. *
* * @param primaryOutpostArn * The outpost ARN of the primary node. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withPrimaryOutpostArn(String primaryOutpostArn) { setPrimaryOutpostArn(primaryOutpostArn); return this; } /** ** The outpost ARN of the node replicas. *
* * @return The outpost ARN of the node replicas. */ public java.util.List* The outpost ARN of the node replicas. *
* * @param replicaOutpostArns * The outpost ARN of the node replicas. */ public void setReplicaOutpostArns(java.util.Collection* The outpost ARN of the node replicas. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setReplicaOutpostArns(java.util.Collection)} or {@link #withReplicaOutpostArns(java.util.Collection)} if * you want to override the existing values. *
* * @param replicaOutpostArns * The outpost ARN of the node replicas. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withReplicaOutpostArns(String... replicaOutpostArns) { if (this.replicaOutpostArns == null) { setReplicaOutpostArns(new com.amazonaws.internal.SdkInternalList* The outpost ARN of the node replicas. *
* * @param replicaOutpostArns * The outpost ARN of the node replicas. * @return Returns a reference to this object so that method calls can be chained together. */ public NodeGroupConfiguration withReplicaOutpostArns(java.util.Collection