Class DistributableImmutableSession
java.lang.Object
org.wildfly.clustering.spring.session.DistributableImmutableSession
- All Implemented Interfaces:
AutoCloseable,org.springframework.session.Session,SpringSession
Immutable session implementation for use by
FindByIndexNameSessionRepository.findByIndexNameAndIndexValue(String, String).- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDistributableImmutableSession(org.wildfly.clustering.session.ImmutableSession session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()To be invoked bySessionRepository.save(Session).<T> TgetAttribute(String attributeName) getId()voidInvalidates this session.booleanbooleanisNew()Indicates whether this session was created during the current request.voidremoveAttribute(String attributeName) voidsetAttribute(String attributeName, Object attributeValue) voidsetLastAccessedTime(Instant lastAccessedTime) voidsetMaxInactiveInterval(Duration interval) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.session.Session
getAttributeOrDefault, getRequiredAttribute
-
Constructor Details
-
DistributableImmutableSession
public DistributableImmutableSession(org.wildfly.clustering.session.ImmutableSession session)
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.springframework.session.Session
-
changeSessionId
- Specified by:
changeSessionIdin interfaceorg.springframework.session.Session
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.session.Session
-
getAttributeNames
-
setAttribute
-
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.session.Session
-
getCreationTime
- Specified by:
getCreationTimein interfaceorg.springframework.session.Session
-
setLastAccessedTime
- Specified by:
setLastAccessedTimein interfaceorg.springframework.session.Session
-
getLastAccessedTime
- Specified by:
getLastAccessedTimein interfaceorg.springframework.session.Session
-
setMaxInactiveInterval
- Specified by:
setMaxInactiveIntervalin interfaceorg.springframework.session.Session
-
getMaxInactiveInterval
- Specified by:
getMaxInactiveIntervalin interfaceorg.springframework.session.Session
-
isExpired
public boolean isExpired()- Specified by:
isExpiredin interfaceorg.springframework.session.Session
-
isNew
public boolean isNew()Description copied from interface:SpringSessionIndicates whether this session was created during the current request.- Specified by:
isNewin interfaceSpringSession- Returns:
- true, if this session was newly created, false otherwise.
-
invalidate
public void invalidate()Description copied from interface:SpringSessionInvalidates this session.- Specified by:
invalidatein interfaceSpringSession
-
close
public void close()Description copied from interface:SpringSessionTo be invoked bySessionRepository.save(Session).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSpringSession
-