Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

A group of settings that will be applied to the cache cluster in the future, or that are currently being applied.

 
 public class PendingModifiedValues implements SerializableCloneable {

    
The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

 
     private Integer numCacheNodes;

    
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).
 
The new cache engine version that the cache cluster will run.
 
     private String engineVersion;

    
Default constructor for a new PendingModifiedValues object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public PendingModifiedValues() {}
    
    
The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

Returns:
The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

 
     public Integer getNumCacheNodes() {
         return ;
     }
    
    
The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

Parameters:
numCacheNodes The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

 
     public void setNumCacheNodes(Integer numCacheNodes) {
         this. = numCacheNodes;
     }
    
    
The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

Returns a reference to this object so that method calls can be chained together.

Parameters:
numCacheNodes The new number of cache nodes for the cache cluster.

For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public PendingModifiedValues withNumCacheNodes(Integer numCacheNodes) {
         this. = numCacheNodes;
         return this;
     }

    
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).

Returns:
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).

Parameters:
cacheNodeIdsToRemove A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).
    public void setCacheNodeIdsToRemove(java.util.Collection<StringcacheNodeIdsToRemove) {
        if (cacheNodeIdsToRemove == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringcacheNodeIdsToRemoveCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(cacheNodeIdsToRemove.size());
        cacheNodeIdsToRemoveCopy.addAll(cacheNodeIdsToRemove);
        this. = cacheNodeIdsToRemoveCopy;
    }
    
    
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).

NOTE: This method appends the values to the existing list (if any). Use setCacheNodeIdsToRemove(java.util.Collection) or withCacheNodeIdsToRemove(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheNodeIdsToRemove A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).
Returns:
A reference to this updated object so that method calls can be chained together.
    public PendingModifiedValues withCacheNodeIdsToRemove(String... cacheNodeIdsToRemove) {
        if (getCacheNodeIdsToRemove() == nullsetCacheNodeIdsToRemove(new java.util.ArrayList<String>(cacheNodeIdsToRemove.length));
        for (String value : cacheNodeIdsToRemove) {
            getCacheNodeIdsToRemove().add(value);
        }
        return this;
    }
    
    
A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).

Returns a reference to this object so that method calls can be chained together.

Parameters:
cacheNodeIdsToRemove A list of cache node IDs that are being removed (or will be removed) from the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.).
Returns:
A reference to this updated object so that method calls can be chained together.
    public PendingModifiedValues withCacheNodeIdsToRemove(java.util.Collection<StringcacheNodeIdsToRemove) {
        if (cacheNodeIdsToRemove == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringcacheNodeIdsToRemoveCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(cacheNodeIdsToRemove.size());
            cacheNodeIdsToRemoveCopy.addAll(cacheNodeIdsToRemove);
            this. = cacheNodeIdsToRemoveCopy;
        }
        return this;
    }

    
The new cache engine version that the cache cluster will run.

Returns:
The new cache engine version that the cache cluster will run.
    public String getEngineVersion() {
        return ;
    }
    
    
The new cache engine version that the cache cluster will run.

Parameters:
engineVersion The new cache engine version that the cache cluster will run.
    public void setEngineVersion(String engineVersion) {
        this. = engineVersion;
    }
    
    
The new cache engine version that the cache cluster will run.

Returns a reference to this object so that method calls can be chained together.

Parameters:
engineVersion The new cache engine version that the cache cluster will run.
Returns:
A reference to this updated object so that method calls can be chained together.
    public PendingModifiedValues withEngineVersion(String engineVersion) {
        this. = engineVersion;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getNumCacheNodes() != nullsb.append("NumCacheNodes: " + getNumCacheNodes() + ",");
        if (getCacheNodeIdsToRemove() != nullsb.append("CacheNodeIdsToRemove: " + getCacheNodeIdsToRemove() + ",");
        if (getEngineVersion() != nullsb.append("EngineVersion: " + getEngineVersion() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getNumCacheNodes() == null) ? 0 : getNumCacheNodes().hashCode()); 
        hashCode = prime * hashCode + ((getCacheNodeIdsToRemove() == null) ? 0 : getCacheNodeIdsToRemove().hashCode()); 
        hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof PendingModifiedValues == falsereturn false;
        PendingModifiedValues other = (PendingModifiedValues)obj;
        
        if (other.getNumCacheNodes() == null ^ this.getNumCacheNodes() == nullreturn false;
        if (other.getNumCacheNodes() != null && other.getNumCacheNodes().equals(this.getNumCacheNodes()) == falsereturn false
        if (other.getCacheNodeIdsToRemove() == null ^ this.getCacheNodeIdsToRemove() == nullreturn false;
        if (other.getCacheNodeIdsToRemove() != null && other.getCacheNodeIdsToRemove().equals(this.getCacheNodeIdsToRemove()) == falsereturn false
        if (other.getEngineVersion() == null ^ this.getEngineVersion() == nullreturn false;
        if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == falsereturn false
        return true;
    }
    
    @Override
    public PendingModifiedValues clone() {
        try {
            return (PendingModifiedValuessuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X