Class SessionExpirationPolicyCustomExpiryAdapter
java.lang.Object
org.springframework.session.data.gemfire.expiration.support.SessionExpirationPolicyCustomExpiryAdapter
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.CustomExpiry<String,
,Object> org.apache.geode.cache.Declarable
public class SessionExpirationPolicyCustomExpiryAdapter
extends Object
implements org.apache.geode.cache.CustomExpiry<String,Object>
The
SessionExpirationPolicyCustomExpiryAdapter
class is an Apache Geode/Pivotal GemFire CustomExpiry
implementation wrapping and adapting an instance of the SessionExpirationPolicy
strategy interface
to plugin to and affect Apache Geode/Pivotal GemFire's expiration behavior.- Since:
- 1.0.0
- See Also:
-
CustomExpiry
ExpirationAction
ExpirationAttributes
Region
PdxInstance
Session
SessionExpirationPolicy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSessionExpirationPolicyCustomExpiryAdapter
(SessionExpirationPolicy sessionExpirationPolicy) Constructs a newSessionExpirationPolicyCustomExpiryAdapter
initialized with the given, requiredSessionExpirationPolicy
. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.geode.cache.ExpirationAttributes
protected SessionExpirationPolicy
Returns the configuredSessionExpirationPolicy
defining the expiration policies for all managedSessions
.protected org.apache.geode.cache.ExpirationAttributes
newExpirationAttributes
(Duration expirationTimeout) Constructs a newExpirationAttributes
initialized with the givenexpiration timeut
and defaultexpirtion action
.protected org.apache.geode.cache.ExpirationAttributes
newExpirationAttributes
(Duration expirationTimeout, SessionExpirationPolicy.ExpirationAction expirationAction) Constructs a newExpirationAttributes
initialized with the givenexpiration timeout
and action taken when theSession
expires.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.cache.CacheCallback
close
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Field Details
-
DEFAULT_EXPIRATION_ACTION
-
-
Constructor Details
-
SessionExpirationPolicyCustomExpiryAdapter
public SessionExpirationPolicyCustomExpiryAdapter(@NonNull SessionExpirationPolicy sessionExpirationPolicy) Constructs a newSessionExpirationPolicyCustomExpiryAdapter
initialized with the given, requiredSessionExpirationPolicy
.- Parameters:
sessionExpirationPolicy
-SessionExpirationPolicy
used to determine the expiration policy for allSessions
.- Throws:
IllegalArgumentException
- ifSessionExpirationPolicy
is null.- See Also:
-
-
Method Details
-
getSessionExpirationPolicy
Returns the configuredSessionExpirationPolicy
defining the expiration policies for all managedSessions
.- Returns:
- the configured
SessionExpirationPolicy
. - See Also:
-
getExpiry
-
newExpirationAttributes
@NonNull protected org.apache.geode.cache.ExpirationAttributes newExpirationAttributes(@NonNull Duration expirationTimeout) Constructs a newExpirationAttributes
initialized with the givenexpiration timeut
and defaultexpirtion action
.- Parameters:
expirationTimeout
-Duration
specifying the expiration timeout.- Returns:
- the new
ExpirationAttributes
. - See Also:
-
newExpirationAttributes(Duration, SessionExpirationPolicy.ExpirationAction)
ExpirationAttributes
Duration
-
newExpirationAttributes
@NonNull protected org.apache.geode.cache.ExpirationAttributes newExpirationAttributes(@NonNull Duration expirationTimeout, @Nullable SessionExpirationPolicy.ExpirationAction expirationAction) Constructs a newExpirationAttributes
initialized with the givenexpiration timeout
and action taken when theSession
expires.- Parameters:
expirationTimeout
-Duration
specifying the expiration timeout.expirationAction
- action taken when theSession
expires.- Returns:
- the new
ExpirationAttributes
. - See Also:
-
newExpirationAttributes(int, ExpirationAction)
SessionExpirationPolicy.ExpirationAction
ExpirationAttributes
Duration
-