public interface ExpirationPolicy
extends java.io.Serializable
Ticket
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets name of this expiration policy.
|
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.
|
default java.lang.Long |
getTimeToLive(TicketState ticketState)
Method to determine the actual TTL of a ticket, based on the policy.
|
boolean |
isExpired(TicketState ticketState)
Method to determine if a Ticket has expired or not, based on the policy.
|
boolean isExpired(TicketState ticketState)
ticketState
- The snapshot of the current ticket statedefault java.lang.Long getTimeToLive(TicketState ticketState)
ticketState
- The snapshot of the current ticket statejava.lang.Long getTimeToLive()
java.lang.Long getTimeToIdle()
java.lang.String getName()