Class CachedSession<C>
java.lang.Object
org.wildfly.clustering.session.cache.DecoratedSession<C>
org.wildfly.clustering.session.cache.CachedSession<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
AutoCloseable, Supplier<Session<C>>, CacheableSession<C>, ImmutableSession, Session<C>
A session facade whose lifecycle is managed by a
Cache.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCachedSession(Session<C> session, Runnable closeTask) Creates a cached session decorator -
Method Summary
Methods inherited from class DecoratedSession
equals, get, getAttributes, getContext, getId, getMetaData, hashCode, invalidate, isValid, toStringMethods inherited from interface ImmutableSession
getAttributes, getId, isValidMethods inherited from interface Session
getContext, getMetaData, invalidate
-
Constructor Details
-
CachedSession
Creates a cached session decorator- Parameters:
session- a sessioncloseTask- a task to run onSession.close().
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSession<C>- Overrides:
closein classDecoratedSession<C>
-