Class CompositeSession<C>
java.lang.Object
org.wildfly.clustering.session.cache.AbstractImmutableSession
org.wildfly.clustering.session.cache.CompositeImmutableSession
org.wildfly.clustering.session.cache.CompositeSession<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
AutoCloseable,ImmutableSession,Session<C>
Generic session implementation composed of attributes and metadata.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeSession(String id, InvalidatableSessionMetaData metaData, SessionAttributes attributes, Supplied<C> context, Supplier<C> contextFactory, CacheEntryRemover<String> remover) -
Method Summary
Methods inherited from class org.wildfly.clustering.session.cache.AbstractImmutableSession
equals, getId, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wildfly.clustering.session.ImmutableSession
getId
-
Constructor Details
-
CompositeSession
public CompositeSession(String id, InvalidatableSessionMetaData metaData, SessionAttributes attributes, Supplied<C> context, Supplier<C> contextFactory, CacheEntryRemover<String> remover)
-
-
Method Details
-
getAttributes
Description copied from interface:ImmutableSessionReturns this session's attributes.- Specified by:
getAttributesin interfaceImmutableSession- Overrides:
getAttributesin classCompositeImmutableSession- Returns:
- this session's attributes
-
isValid
public boolean isValid()Description copied from interface:ImmutableSessionIndicates whether or not this session is valid.- Specified by:
isValidin interfaceImmutableSession- Overrides:
isValidin classCompositeImmutableSession- 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>
-
getMetaData
Description copied from interface:ImmutableSessionReturns this session's meta data.- Specified by:
getMetaDatain interfaceImmutableSession- Specified by:
getMetaDatain interfaceSession<C>- Overrides:
getMetaDatain classCompositeImmutableSession- Returns:
- this session's meta data
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSession<C>
-
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
-