Class DetachedSession<C>
java.lang.Object
org.wildfly.clustering.session.cache.AbstractImmutableSession
org.wildfly.clustering.session.cache.DetachedSession<C>
- Type Parameters:
C- the session context
- All Implemented Interfaces:
AutoCloseable, ImmutableSession, Session<C>
Detached session implementation, for use outside the context of a request.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDetachedSession(SessionManager<C> manager, String id, C context) Creates a detached session. -
Method Summary
Methods inherited from class AbstractImmutableSession
equals, getId, hashCode, toStringMethods inherited from interface ImmutableSession
getId
-
Constructor Details
-
DetachedSession
Creates a detached session.- Parameters:
manager- the session managerid- the identifier of the detached sessioncontext- the context of the detached session
-
-
Method Details
-
getMetaData
Description copied from interface:ImmutableSessionReturns this session's meta data.- Specified by:
getMetaDatain interfaceImmutableSession- Specified by:
getMetaDatain interfaceSession<C>- Returns:
- this session's meta data
-
getAttributes
Description copied from interface:ImmutableSessionReturns this session's attributes.- Specified by:
getAttributesin interfaceImmutableSession- Returns:
- this session's attributes
-
getContext
Description copied from interface:SessionReturns the local context of this session. The local context is *not* replicated to other nodes in the cluster.- Specified by:
getContextin interfaceSession<C>- Returns:
- a local context
-
isValid
public boolean isValid()Description copied from interface:ImmutableSessionIndicates whether or not this session is valid.- Specified by:
isValidin interfaceImmutableSession- Returns:
- true, if this session is valid, false otherwise
-
invalidate
public void invalidate()Description copied from interface:SessionInvalidates this session.- Specified by:
invalidatein interfaceSession<C>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSession<C>
-