Class DefaultSessionCreationMetaDataEntry<C>
- java.lang.Object
-
- org.wildfly.clustering.web.cache.session.metadata.fine.DefaultSessionCreationMetaDataEntry<C>
-
- All Implemented Interfaces:
Remappable<SessionCreationMetaDataEntry<C>,Supplier<Offset<Duration>>>,Contextual<C>,ImmutableSessionCreationMetaData,SessionCreationMetaData,SessionCreationMetaDataEntry<C>
public class DefaultSessionCreationMetaDataEntry<C> extends Object implements SessionCreationMetaDataEntry<C>
- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description DefaultSessionCreationMetaDataEntry()DefaultSessionCreationMetaDataEntry(Instant creationTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CgetContext(Supplier<C> factory)Returns the context, creating it from the specified factory, if necessary.InstantgetCreationTime()Returns the time at which this session was created.DurationgetTimeout()Returns the maximum duration of time this session may remain idle before it will be expired by the session manager.SessionCreationMetaDataEntry<C>remap(Supplier<Offset<Duration>> timeoutOffset)voidsetTimeout(Duration timeout)Sets the maximum duration of time this session may remain idle before it will be expired by the session manager.StringtoString()
-
-
-
Constructor Detail
-
DefaultSessionCreationMetaDataEntry
public DefaultSessionCreationMetaDataEntry()
-
DefaultSessionCreationMetaDataEntry
public DefaultSessionCreationMetaDataEntry(Instant creationTime)
-
-
Method Detail
-
getCreationTime
public Instant 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
-
getTimeout
public Duration getTimeout()
Description copied from interface:ImmutableSessionCreationMetaDataReturns the maximum duration of time this session may remain idle before it will be expired by the session manager.- Specified by:
getTimeoutin interfaceImmutableSessionCreationMetaData- Returns:
- the maximum duration of time this session may remain idle before it will be expired by the session manager.
-
setTimeout
public void setTimeout(Duration timeout)
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:
setTimeoutin interfaceSessionCreationMetaData
-
getContext
public C getContext(Supplier<C> factory)
Description copied from interface:ContextualReturns the context, creating it from the specified factory, if necessary.- Specified by:
getContextin interfaceContextual<C>- Returns:
- the context.
-
remap
public SessionCreationMetaDataEntry<C> remap(Supplier<Offset<Duration>> timeoutOffset)
- Specified by:
remapin interfaceRemappable<SessionCreationMetaDataEntry<C>,Supplier<Offset<Duration>>>
-
-