public class LBCookieStickinessPolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Information about a policy for duration-based session stickiness.
Modifier and Type | Field and Description |
---|---|
private java.lang.Long |
cookieExpirationPeriod
The time period, in seconds, after which the cookie should be considered
stale.
|
private java.lang.String |
policyName
The name for the policy being created.
|
Constructor and Description |
---|
LBCookieStickinessPolicy()
Default constructor for LBCookieStickinessPolicy object.
|
LBCookieStickinessPolicy(java.lang.String policyName,
java.lang.Long cookieExpirationPeriod)
Constructs a new LBCookieStickinessPolicy object.
|
Modifier and Type | Method and Description |
---|---|
LBCookieStickinessPolicy |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getCookieExpirationPeriod()
The time period, in seconds, after which the cookie should be considered
stale.
|
java.lang.String |
getPolicyName()
The name for the policy being created.
|
int |
hashCode() |
void |
setCookieExpirationPeriod(java.lang.Long cookieExpirationPeriod)
The time period, in seconds, after which the cookie should be considered
stale.
|
void |
setPolicyName(java.lang.String policyName)
The name for the policy being created.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
LBCookieStickinessPolicy |
withCookieExpirationPeriod(java.lang.Long cookieExpirationPeriod)
The time period, in seconds, after which the cookie should be considered
stale.
|
LBCookieStickinessPolicy |
withPolicyName(java.lang.String policyName)
The name for the policy being created.
|
private java.lang.String policyName
The name for the policy being created. The name must be unique within the set of policies for this load balancer.
private java.lang.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.
public LBCookieStickinessPolicy()
public LBCookieStickinessPolicy(java.lang.String policyName, java.lang.Long cookieExpirationPeriod)
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.public void setPolicyName(java.lang.String policyName)
The name for the policy being created. The name must be unique within the set of policies for this load balancer.
policyName
- The name for the policy being created. The name must be unique
within the set of policies for this load balancer.public java.lang.String getPolicyName()
The name for the policy being created. The name must be unique within the set of policies for this load balancer.
public LBCookieStickinessPolicy withPolicyName(java.lang.String policyName)
The name for the policy being created. The name must be unique within the set of policies for this load balancer.
policyName
- The name for the policy being created. The name must be unique
within the set of policies for this load balancer.public void setCookieExpirationPeriod(java.lang.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.
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.public java.lang.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.
public LBCookieStickinessPolicy withCookieExpirationPeriod(java.lang.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.
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.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public LBCookieStickinessPolicy clone()
clone
in class java.lang.Object