Spring Session for VMware GemFire
Interface SessionExpirationPolicy
- All Known Implementing Classes:
FixedTimeoutSessionExpirationPolicy,IdleTimeoutSessionExpirationPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
SessionExpirationPolicy interface is a Strategy Interface defining a contract for users to implement
custom application expiration policies and rules for Session state management.
Examples of different Session expiration strategies might include, but are not limited to:
idle expiration timeouts, fixed duration expiration timeouts, Time-To-Live (TTL) expiration, and so on.- Since:
- 2.1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumeration of different actions to take when aSessionexpires. -
Method Summary
Modifier and TypeMethodDescriptiondetermineExpirationTimeout(org.springframework.session.Session session) Specifies theactionto take when theSessionexpires.
-
Method Details
-
determineExpirationTimeout
Determines anOptionallength of timeuntil the givenSessionwill expire. AZeroorNegative Durationindicates that theSessionhas expired. May returnOptional.EMPTYas a "suggestion" that the Session should not expire or that the expiration determination should be handled by the next expiration policy in a chain of policies. Implementors are free to compose 2 or more expiration policies using Composite Software Design Pattern as necessary. In Apache Geode or Pivotal GemFire's case, anOptional.EMPTYreturn value will indicate that it should default to the configured Entry Idle Timeout (TTI) Expiration Policy of theRegionmanagingSessionstate to determine exactly when theSessionwill expire. -
getExpirationAction
Specifies theactionto take when theSessionexpires. Defaults toSessionExpirationPolicy.ExpirationAction.INVALIDATE.- Returns:
- an
SessionExpirationPolicy.ExpirationActionspecifying the action to take when theSessionexpires. - See Also:
-