Class LBCookieStickinessPolicy

java.lang.Object
com.amazonaws.services.elasticloadbalancing.model.LBCookieStickinessPolicy
All Implemented Interfaces:
Serializable, Cloneable

public class LBCookieStickinessPolicy extends Object implements Serializable, Cloneable

Information about a policy for duration-based session stickiness.

See Also:
  • Constructor Details

    • LBCookieStickinessPolicy

      public LBCookieStickinessPolicy()
      Default constructor for LBCookieStickinessPolicy object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • LBCookieStickinessPolicy

      public LBCookieStickinessPolicy(String policyName, Long cookieExpirationPeriod)
      Constructs a new LBCookieStickinessPolicy object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      policyName - The name for the policy being created. The name must be unique within the set of policies for this load balancer.
      cookieExpirationPeriod - The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.
  • Method Details

    • setPolicyName

      public void setPolicyName(String policyName)

      The name for the policy being created. The name must be unique within the set of policies for this load balancer.

      Parameters:
      policyName - The name for the policy being created. The name must be unique within the set of policies for this load balancer.
    • getPolicyName

      public String getPolicyName()

      The name for the policy being created. The name must be unique within the set of policies for this load balancer.

      Returns:
      The name for the policy being created. The name must be unique within the set of policies for this load balancer.
    • withPolicyName

      public LBCookieStickinessPolicy withPolicyName(String policyName)

      The name for the policy being created. The name must be unique within the set of policies for this load balancer.

      Parameters:
      policyName - The name for the policy being created. The name must be unique within the set of policies for this load balancer.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCookieExpirationPeriod

      public void setCookieExpirationPeriod(Long cookieExpirationPeriod)

      The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.

      Parameters:
      cookieExpirationPeriod - The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.
    • getCookieExpirationPeriod

      public Long getCookieExpirationPeriod()

      The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.

      Returns:
      The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.
    • withCookieExpirationPeriod

      public LBCookieStickinessPolicy withCookieExpirationPeriod(Long cookieExpirationPeriod)

      The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.

      Parameters:
      cookieExpirationPeriod - The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public LBCookieStickinessPolicy clone()
      Overrides:
      clone in class Object