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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LBCookieStickinessPolicy()
Default constructor for LBCookieStickinessPolicy object.LBCookieStickinessPolicy(String policyName, Long cookieExpirationPeriod)
Constructs a new LBCookieStickinessPolicy object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LBCookieStickinessPolicy
clone()
boolean
equals(Object obj)
Long
getCookieExpirationPeriod()
The time period, in seconds, after which the cookie should be considered stale.String
getPolicyName()
The name for the policy being created.int
hashCode()
void
setCookieExpirationPeriod(Long cookieExpirationPeriod)
The time period, in seconds, after which the cookie should be considered stale.void
setPolicyName(String policyName)
The name for the policy being created.String
toString()
Returns a string representation of this object; useful for testing and debugging.LBCookieStickinessPolicy
withCookieExpirationPeriod(Long cookieExpirationPeriod)
The time period, in seconds, after which the cookie should be considered stale.LBCookieStickinessPolicy
withPolicyName(String policyName)
The name for the policy being created.
-
-
-
Constructor Detail
-
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 Detail
-
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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public LBCookieStickinessPolicy clone()
-
-