public class TimeoutExpirationPolicy extends AbstractCasExpirationPolicy
The expiration policy defined by this class is one of inactivity. If you are inactive for the specified amount of time, the ticket will be expired.
Constructor and Description |
---|
TimeoutExpirationPolicy()
No-arg constructor for serialization support.
|
TimeoutExpirationPolicy(long timeToKillInSeconds)
Instantiates a new timeout expiration policy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getTimeToIdle()
Describes the idle time duration for the item.
|
java.lang.Long |
getTimeToLive()
Describes the time duration where this policy should consider the item alive.
|
int |
hashCode() |
boolean |
isExpired(TicketState ticketState)
Method to determine if a Ticket has expired or not, based on the policy.
|
public TimeoutExpirationPolicy()
public TimeoutExpirationPolicy(long timeToKillInSeconds)
timeToKillInSeconds
- the time to kill in secondspublic boolean isExpired(TicketState ticketState)
ExpirationPolicy
ticketState
- The snapshot of the current ticket statepublic java.lang.Long getTimeToLive()
ExpirationPolicy
public java.lang.Long getTimeToIdle()
ExpirationPolicy
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object