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

The attributes for a load balancer.

 
 public class LoadBalancerAttributes implements SerializableCloneable {

    
If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

 
If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

 
     private AccessLog accessLog;

    
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

 
     private ConnectionDraining connectionDraining;

    
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

 
     private ConnectionSettings connectionSettings;

    
This parameter is reserved.
 
If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

Returns:
If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

 
         return ;
     }
    
    
If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

Parameters:
crossZoneLoadBalancing If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

    public void setCrossZoneLoadBalancing(CrossZoneLoadBalancing crossZoneLoadBalancing) {
        this. = crossZoneLoadBalancing;
    }
    
    
If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

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

Parameters:
crossZoneLoadBalancing If enabled, the load balancer routes the request traffic evenly across all back-end instances regardless of the Availability Zones.

For more information, see Enable Cross-Zone Load Balancing in the Elastic Load Balancing Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = crossZoneLoadBalancing;
        return this;
    }

    
If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

Returns:
If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

    public AccessLog getAccessLog() {
        return ;
    }
    
    
If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

Parameters:
accessLog If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

    public void setAccessLog(AccessLog accessLog) {
        this. = accessLog;
    }
    
    
If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

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

Parameters:
accessLog If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Elastic Load Balancing Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerAttributes withAccessLog(AccessLog accessLog) {
        this. = accessLog;
        return this;
    }

    
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

Returns:
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

        return ;
    }
    
    
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

Parameters:
connectionDraining If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

    public void setConnectionDraining(ConnectionDraining connectionDraining) {
        this. = connectionDraining;
    }
    
    
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

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

Parameters:
connectionDraining If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy back-end instance.

For more information, see Enable Connection Draining in the Elastic Load Balancing Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = connectionDraining;
        return this;
    }

    
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

Returns:
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

        return ;
    }
    
    
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

Parameters:
connectionSettings If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

    public void setConnectionSettings(ConnectionSettings connectionSettings) {
        this. = connectionSettings;
    }
    
    
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

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

Parameters:
connectionSettings If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Elastic Load Balancing Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = connectionSettings;
        return this;
    }

    
This parameter is reserved.

Returns:
This parameter is reserved.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
This parameter is reserved.

Parameters:
additionalAttributes This parameter is reserved.
    public void setAdditionalAttributes(java.util.Collection<AdditionalAttributeadditionalAttributes) {
        if (additionalAttributes == null) {
            this. = null;
            return;
        }
        additionalAttributesCopy.addAll(additionalAttributes);
        this. = additionalAttributesCopy;
    }
    
    
This parameter is reserved.

NOTE: This method appends the values to the existing list (if any). Use setAdditionalAttributes(java.util.Collection) or withAdditionalAttributes(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:
additionalAttributes This parameter is reserved.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LoadBalancerAttributes withAdditionalAttributes(AdditionalAttribute... additionalAttributes) {
        if (getAdditionalAttributes() == nullsetAdditionalAttributes(new java.util.ArrayList<AdditionalAttribute>(additionalAttributes.length));
        for (AdditionalAttribute value : additionalAttributes) {
            getAdditionalAttributes().add(value);
        }
        return this;
    }
    
    
This parameter is reserved.

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

Parameters:
additionalAttributes This parameter is reserved.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (additionalAttributes == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<AdditionalAttributeadditionalAttributesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<AdditionalAttribute>(additionalAttributes.size());
            additionalAttributesCopy.addAll(additionalAttributes);
            this. = additionalAttributesCopy;
        }
        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 (getCrossZoneLoadBalancing() != nullsb.append("CrossZoneLoadBalancing: " + getCrossZoneLoadBalancing() + ",");
        if (getAccessLog() != nullsb.append("AccessLog: " + getAccessLog() + ",");
        if (getConnectionDraining() != nullsb.append("ConnectionDraining: " + getConnectionDraining() + ",");
        if (getConnectionSettings() != nullsb.append("ConnectionSettings: " + getConnectionSettings() + ",");
        if (getAdditionalAttributes() != nullsb.append("AdditionalAttributes: " + getAdditionalAttributes() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCrossZoneLoadBalancing() == null) ? 0 : getCrossZoneLoadBalancing().hashCode()); 
        hashCode = prime * hashCode + ((getAccessLog() == null) ? 0 : getAccessLog().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionDraining() == null) ? 0 : getConnectionDraining().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionSettings() == null) ? 0 : getConnectionSettings().hashCode()); 
        hashCode = prime * hashCode + ((getAdditionalAttributes() == null) ? 0 : getAdditionalAttributes().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof LoadBalancerAttributes == falsereturn false;
        LoadBalancerAttributes other = (LoadBalancerAttributes)obj;
        
        if (other.getCrossZoneLoadBalancing() == null ^ this.getCrossZoneLoadBalancing() == nullreturn false;
        if (other.getCrossZoneLoadBalancing() != null && other.getCrossZoneLoadBalancing().equals(this.getCrossZoneLoadBalancing()) == falsereturn false
        if (other.getAccessLog() == null ^ this.getAccessLog() == nullreturn false;
        if (other.getAccessLog() != null && other.getAccessLog().equals(this.getAccessLog()) == falsereturn false
        if (other.getConnectionDraining() == null ^ this.getConnectionDraining() == nullreturn false;
        if (other.getConnectionDraining() != null && other.getConnectionDraining().equals(this.getConnectionDraining()) == falsereturn false
        if (other.getConnectionSettings() == null ^ this.getConnectionSettings() == nullreturn false;
        if (other.getConnectionSettings() != null && other.getConnectionSettings().equals(this.getConnectionSettings()) == falsereturn false
        if (other.getAdditionalAttributes() == null ^ this.getAdditionalAttributes() == nullreturn false;
        if (other.getAdditionalAttributes() != null && other.getAdditionalAttributes().equals(this.getAdditionalAttributes()) == falsereturn false
        return true;
    }
    
    @Override
    public LoadBalancerAttributes clone() {
        try {
            return (LoadBalancerAttributessuper.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