Class DefaultSessionMetaDataEntry<C>
java.lang.Object
org.wildfly.clustering.session.cache.metadata.coarse.AbstractSessionMetaDataEntry
org.wildfly.clustering.session.cache.metadata.coarse.DefaultSessionMetaDataEntry<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
org.wildfly.clustering.cache.function.Remappable<ContextualSessionMetaDataEntry<C>,,SessionMetaDataEntryOffsets> Contextual<C>,ContextualSessionMetaDataEntry<C>,ImmutableSessionMetaDataEntry,SessionMetaDataEntry
public class DefaultSessionMetaDataEntry<C>
extends AbstractSessionMetaDataEntry
implements ContextualSessionMetaDataEntry<C>
Default contextual session metadata entry.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSessionMetaDataEntry(Instant creationTime) Create a session metadata entry for an existing session. -
Method Summary
Modifier and TypeMethodDescriptionorg.wildfly.clustering.server.util.Supplied<C> Returns the context as a supplied value.org.wildfly.clustering.server.offset.OffsetValue<Instant> Returns the last access end time, as an offset of the last access start time.org.wildfly.clustering.server.offset.OffsetValue<Instant> Returns the last access start time, as an offset of the creation time.Returns the duration of time since last access that this session should expire.booleanisNew()Returns true, if this is a newly created entry, false otherwise.remap(SessionMetaDataEntryOffsets offsets) voidsetMaxIdle(Duration maxIdle) Specifies the duration of time since last access after which this session will expire.Methods inherited from class org.wildfly.clustering.session.cache.metadata.coarse.AbstractSessionMetaDataEntry
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wildfly.clustering.session.cache.metadata.coarse.ContextualSessionMetaDataEntry
getCreationTime
-
Constructor Details
-
DefaultSessionMetaDataEntry
Create a session metadata entry for an existing session.- Parameters:
creationTime- the instant this session was created.
-
-
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.
-
getMaxIdle
Description copied from interface:ImmutableSessionMetaDataEntryReturns the duration of time since last access that this session should expire. An immortal session will returnDuration.ZERO.- Specified by:
getMaxIdlein interfaceImmutableSessionMetaDataEntry- Returns:
- the duration of time since last access that this session should expire.
-
setMaxIdle
Description copied from interface:SessionMetaDataEntrySpecifies the duration of time since last access after which this session will expire.- Specified by:
setMaxIdlein interfaceSessionMetaDataEntry- Parameters:
maxIdle- the duration of time since last access after which this session will expire.
-
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 as a supplied value.- Specified by:
getContextin interfaceContextual<C>- Returns:
- a supplied context.
-
remap
- Specified by:
remapin interfaceorg.wildfly.clustering.cache.function.Remappable<ContextualSessionMetaDataEntry<C>,SessionMetaDataEntryOffsets>
-