Class MutableSessionCreationMetaData
- java.lang.Object
-
- org.wildfly.clustering.web.cache.session.MutableSessionCreationMetaData
-
- All Implemented Interfaces:
AutoCloseable,ImmutableSessionCreationMetaData,SessionCreationMetaData
public class MutableSessionCreationMetaData extends Object implements SessionCreationMetaData
- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description MutableSessionCreationMetaData(SessionCreationMetaData metaData, org.wildfly.clustering.ee.Mutator mutator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Signals the end of the transient lifecycle of this session, typically triggered at the end of a given request.InstantgetCreationTime()Returns the time at which this session was created.DurationgetMaxInactiveInterval()Returns the maximum duration of time this session may remain idle before it will be expired by the session manager.booleaninvalidate()Invalidates this session.booleanisNew()Indicates whether or not this session was newly created.booleanisValid()Indicates whether or not this session has been invalidated.voidsetMaxInactiveInterval(Duration duration)Sets the maximum duration of time this session may remain idle before it will be expired by the session manager.
-
-
-
Constructor Detail
-
MutableSessionCreationMetaData
public MutableSessionCreationMetaData(SessionCreationMetaData metaData, org.wildfly.clustering.ee.Mutator mutator)
-
-
Method Detail
-
isNew
public boolean isNew()
Description copied from interface:SessionCreationMetaDataIndicates whether or not this session was newly created.- Specified by:
isNewin interfaceSessionCreationMetaData- Returns:
- true, if this session was newly created, false otherwise.
-
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
-
getMaxInactiveInterval
public Duration getMaxInactiveInterval()
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:
getMaxInactiveIntervalin interfaceImmutableSessionCreationMetaData- Returns:
- the maximum duration of time this session may remain idle before it will be expired by the session manager.
-
setMaxInactiveInterval
public void setMaxInactiveInterval(Duration duration)
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:
setMaxInactiveIntervalin interfaceSessionCreationMetaData
-
isValid
public boolean isValid()
Description copied from interface:SessionCreationMetaDataIndicates whether or not this session has been invalidated.- Specified by:
isValidin interfaceSessionCreationMetaData- Returns:
- true, if this session was invalidated, false otherwise.
-
invalidate
public boolean invalidate()
Description copied from interface:SessionCreationMetaDataInvalidates this session.- Specified by:
invalidatein interfaceSessionCreationMetaData- Returns:
- true, if this session was previous valid, false otherwise
-
close
public void close()
Description copied from interface:SessionCreationMetaDataSignals the end of the transient lifecycle of this session, typically triggered at the end of a given request.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSessionCreationMetaData
-
-