Class DefaultSessionMetaDataEntry<C>
java.lang.Object
org.wildfly.clustering.web.cache.session.metadata.coarse.DefaultSessionMetaDataEntry<C>
- All Implemented Interfaces:
Remappable<ContextualSessionMetaDataEntry<C>,,SessionMetaDataEntryOffsets> Expiration,Contextual<C>,ContextualSessionMetaDataEntry<C>,ImmutableSessionMetaDataEntry,SessionMetaDataEntry
public class DefaultSessionMetaDataEntry<C>
extends Object
implements ContextualSessionMetaDataEntry<C>
Default contextual session metadata entry.
- Author:
- Paul Ferraro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContext(Supplier<C> factory) Returns the context, creating it from the specified factory, if necessary.Returns the last access end time, as an offset of the last access start time.Returns the last access start time, as an offset of the creation time.booleanisNew()Returns true, if this is a newly created entry, false otherwise.remap(SessionMetaDataEntryOffsets delta) voidsetTimeout(Duration timeout) Sets the session timeout.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wildfly.clustering.web.cache.session.metadata.coarse.ContextualSessionMetaDataEntry
getCreationTimeMethods inherited from interface org.wildfly.clustering.ee.expiration.Expiration
isImmortal
-
Constructor Details
-
DefaultSessionMetaDataEntry
public DefaultSessionMetaDataEntry() -
DefaultSessionMetaDataEntry
-
-
Method Details
-
isNew
public boolean isNew()Description copied from interface:ImmutableSessionMetaDataEntryReturns true, if this is a newly created entry, false otherwise.- Specified by:
isNewin interfaceImmutableSessionMetaDataEntry- Returns:
- true, if this is a newly created entry, false otherwise.
-
getTimeout
- Specified by:
getTimeoutin interfaceExpiration
-
setTimeout
Description copied from interface:SessionMetaDataEntrySets the session timeout.- Specified by:
setTimeoutin interfaceSessionMetaDataEntry
-
getLastAccessStartTime
Description copied from interface:ImmutableSessionMetaDataEntryReturns the last access start time, as an offset of the creation time.- Specified by:
getLastAccessStartTimein interfaceContextualSessionMetaDataEntry<C>- Specified by:
getLastAccessStartTimein interfaceImmutableSessionMetaDataEntry- Specified by:
getLastAccessStartTimein interfaceSessionMetaDataEntry- Returns:
- the last access start time, as an offset of the creation time.
-
getLastAccessEndTime
Description copied from interface:ImmutableSessionMetaDataEntryReturns the last access end time, as an offset of the last access start time.- Specified by:
getLastAccessEndTimein interfaceContextualSessionMetaDataEntry<C>- Specified by:
getLastAccessEndTimein interfaceImmutableSessionMetaDataEntry- Specified by:
getLastAccessEndTimein interfaceSessionMetaDataEntry- Returns:
- the last access end time, as an offset of the last access start time.
-
getContext
Description copied from interface:ContextualReturns the context, creating it from the specified factory, if necessary.- Specified by:
getContextin interfaceContextual<C>- Returns:
- the context.
-
remap
- Specified by:
remapin interfaceRemappable<ContextualSessionMetaDataEntry<C>,SessionMetaDataEntryOffsets>
-
toString
-