Class DefaultSessionCreationMetaDataEntry<C>
java.lang.Object
org.wildfly.clustering.session.cache.metadata.fine.DefaultSessionCreationMetaDataEntry<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
Remappable<SessionCreationMetaDataEntry<C>, Supplier<Offset<Duration>>>, Contextual<C>, ImmutableSessionCreationMetaData, SessionCreationMetaData, SessionCreationMetaDataEntry<C>
public class DefaultSessionCreationMetaDataEntry<C>
extends Object
implements SessionCreationMetaDataEntry<C>
The session creation metadata cache entry.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSessionCreationMetaDataEntry(Instant creationTime) Creates a session creation metadata entry for an existing session. -
Method Summary
Modifier and TypeMethodDescriptionReturns the context as a supplied value.Returns the time at which this session was created.Returns the maximum duration of time this session may remain idle before it will be expired by the session manager, orDuration.ZEROif the session will never expire.Returns a new instance of this object with the specified operand applied.voidsetMaxIdle(Duration timeout) Sets the maximum duration of time this session may remain idle before it will be expired by the session manager.toString()
-
Constructor Details
-
DefaultSessionCreationMetaDataEntry
Creates a session creation metadata entry for an existing session.- Parameters:
creationTime- the instant this session was created
-
-
Method Details
-
getCreationTime
Description copied from interface:ImmutableSessionCreationMetaDataReturns the time at which this session was created.- Specified by:
getCreationTimein interfaceImmutableSessionCreationMetaData- Returns:
- the time at which this session was created
-
getMaxIdle
Description copied from interface:ImmutableSessionCreationMetaDataReturns the maximum duration of time this session may remain idle before it will be expired by the session manager, orDuration.ZEROif the session will never expire.- Specified by:
getMaxIdlein interfaceImmutableSessionCreationMetaData- Returns:
- the maximum duration of time this session may remain idle before it will be expired by the session manager, or
Duration.ZEROif the session will never expire.
-
setMaxIdle
Description copied from interface:SessionCreationMetaDataSets the maximum duration of time this session may remain idle before it will be expired by the session manager.- Specified by:
setMaxIdlein interfaceSessionCreationMetaData- Parameters:
timeout- a maximum duration of time this session may remain idle before it will be expired by the session manager.
-
getContext
Description copied from interface:ContextualReturns the context as a supplied value.- Specified by:
getContextin interfaceContextual<C>- Returns:
- a supplied context.
-
remap
Description copied from interface:RemappableReturns a new instance of this object with the specified operand applied.- Specified by:
remapin interfaceRemappable<SessionCreationMetaDataEntry<C>, Supplier<Offset<Duration>>>- Parameters:
timeoutOffset- a value applied to the replacement value- Returns:
- a replacement value
-
toString
-