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.cloudsearchv2.model;
 

The desired instance type and desired number of replicas of each index partition.

 
 public class ScalingParameters implements SerializableCloneable {

    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

 
     private String desiredInstanceType;

    
The number of replicas you want to preconfigure for each index partition.

Constraints:
Range: 0 -

 
     private Integer desiredReplicationCount;

    
The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.

Constraints:
Range: 0 -

 
     private Integer desiredPartitionCount;

    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

Returns:
The instance type that you want to preconfigure for your domain. For example, search.m1.small.
See also:
PartitionInstanceType
 
     public String getDesiredInstanceType() {
         return ;
     }
    
    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

Parameters:
desiredInstanceType The instance type that you want to preconfigure for your domain. For example, search.m1.small.
See also:
PartitionInstanceType
 
     public void setDesiredInstanceType(String desiredInstanceType) {
         this. = desiredInstanceType;
     }
    
    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

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

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

Parameters:
desiredInstanceType The instance type that you want to preconfigure for your domain. For example, search.m1.small.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
PartitionInstanceType
    public ScalingParameters withDesiredInstanceType(String desiredInstanceType) {
        this. = desiredInstanceType;
        return this;
    }

    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

Parameters:
desiredInstanceType The instance type that you want to preconfigure for your domain. For example, search.m1.small.
See also:
PartitionInstanceType
    public void setDesiredInstanceType(PartitionInstanceType desiredInstanceType) {
        this. = desiredInstanceType.toString();
    }
    
    
The instance type that you want to preconfigure for your domain. For example, search.m1.small.

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

Constraints:
Allowed Values: search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge

Parameters:
desiredInstanceType The instance type that you want to preconfigure for your domain. For example, search.m1.small.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
PartitionInstanceType
    public ScalingParameters withDesiredInstanceType(PartitionInstanceType desiredInstanceType) {
        this. = desiredInstanceType.toString();
        return this;
    }

    
The number of replicas you want to preconfigure for each index partition.

Constraints:
Range: 0 -

Returns:
The number of replicas you want to preconfigure for each index partition.
        return ;
    }
    
    
The number of replicas you want to preconfigure for each index partition.

Constraints:
Range: 0 -

Parameters:
desiredReplicationCount The number of replicas you want to preconfigure for each index partition.
    public void setDesiredReplicationCount(Integer desiredReplicationCount) {
        this. = desiredReplicationCount;
    }
    
    
The number of replicas you want to preconfigure for each index partition.

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

Constraints:
Range: 0 -

Parameters:
desiredReplicationCount The number of replicas you want to preconfigure for each index partition.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ScalingParameters withDesiredReplicationCount(Integer desiredReplicationCount) {
        this. = desiredReplicationCount;
        return this;
    }

    
The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.

Constraints:
Range: 0 -

Returns:
The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.
    public Integer getDesiredPartitionCount() {
        return ;
    }
    
    
The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.

Constraints:
Range: 0 -

Parameters:
desiredPartitionCount The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.
    public void setDesiredPartitionCount(Integer desiredPartitionCount) {
        this. = desiredPartitionCount;
    }
    
    
The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.

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

Constraints:
Range: 0 -

Parameters:
desiredPartitionCount The number of partitions you want to preconfigure for your domain. Only valid when you select m2.2xlarge as the desired instance type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ScalingParameters withDesiredPartitionCount(Integer desiredPartitionCount) {
        this. = desiredPartitionCount;
        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 (getDesiredInstanceType() != nullsb.append("DesiredInstanceType: " + getDesiredInstanceType() + ",");
        if (getDesiredReplicationCount() != nullsb.append("DesiredReplicationCount: " + getDesiredReplicationCount() + ",");
        if (getDesiredPartitionCount() != nullsb.append("DesiredPartitionCount: " + getDesiredPartitionCount() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDesiredInstanceType() == null) ? 0 : getDesiredInstanceType().hashCode()); 
        hashCode = prime * hashCode + ((getDesiredReplicationCount() == null) ? 0 : getDesiredReplicationCount().hashCode()); 
        hashCode = prime * hashCode + ((getDesiredPartitionCount() == null) ? 0 : getDesiredPartitionCount().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ScalingParameters == falsereturn false;
        ScalingParameters other = (ScalingParameters)obj;
        
        if (other.getDesiredInstanceType() == null ^ this.getDesiredInstanceType() == nullreturn false;
        if (other.getDesiredInstanceType() != null && other.getDesiredInstanceType().equals(this.getDesiredInstanceType()) == falsereturn false
        if (other.getDesiredReplicationCount() == null ^ this.getDesiredReplicationCount() == nullreturn false;
        if (other.getDesiredReplicationCount() != null && other.getDesiredReplicationCount().equals(this.getDesiredReplicationCount()) == falsereturn false
        if (other.getDesiredPartitionCount() == null ^ this.getDesiredPartitionCount() == nullreturn false;
        if (other.getDesiredPartitionCount() != null && other.getDesiredPartitionCount().equals(this.getDesiredPartitionCount()) == falsereturn false
        return true;
    }
    
    @Override
    public ScalingParameters clone() {
        try {
            return (ScalingParameterssuper.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