Class CachedSessionManager<C>
java.lang.Object
org.wildfly.clustering.server.service.DecoratedService
org.wildfly.clustering.server.manager.DecoratedManager<String>
org.wildfly.clustering.session.cache.DecoratedSessionManager<C>
org.wildfly.clustering.session.cache.CachedSessionManager<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
Manager<String>, ManagerConfiguration<String>, Service, SessionManager<C>
A session manager decorator that shares session references across concurrent threads.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCachedSessionManager(SessionManager<C> manager, CacheFactory cacheFactory) Creates a cached session manager decorator. -
Method Summary
Modifier and TypeMethodDescriptionCreates a session using the specified identifier.createSessionAsync(String id, Instant creationTime) Creates a session using the specified identifier.Returns the session with the specified identifier, or null if none exists.Methods inherited from class DecoratedSessionManager
findImmutableSessionAsync, getDetachedSession, getStatisticsMethods inherited from class DecoratedManager
getBatchFactory, getIdentifierFactoryMethods inherited from class DecoratedService
isStarted, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Manager
getBatchFactoryMethods inherited from interface ManagerConfiguration
getIdentifierFactoryMethods inherited from interface SessionManager
createSession, createSession, findImmutableSession, findSession
-
Constructor Details
-
CachedSessionManager
Creates a cached session manager decorator.- Parameters:
manager- a session managercacheFactory- a cache factory
-
-
Method Details
-
createSessionAsync
Description copied from interface:SessionManagerCreates a session using the specified identifier. Sessions returned by this method must be closed viaSession.close(). This method is intended to be invoked within the context of a batch.- Parameters:
id- a session identifier- Returns:
- a new web session, or null if a session with the specified identifier already exists.
-
createSessionAsync
Description copied from interface:SessionManagerCreates a session using the specified identifier. Sessions returned by this method must be closed viaSession.close(). This method is intended to be invoked within the context of a batch.- Specified by:
createSessionAsyncin interfaceSessionManager<C>- Overrides:
createSessionAsyncin classDecoratedSessionManager<C>- Parameters:
id- a session identifiercreationTime- the time this session was created- Returns:
- a new web session, or null if a session with the specified identifier already exists.
-
findSessionAsync
Description copied from interface:SessionManagerReturns the session with the specified identifier, or null if none exists. Sessions returned by this method must be closed viaSession.close(). This method is intended to be invoked within the context of a batch.- Specified by:
findSessionAsyncin interfaceSessionManager<C>- Overrides:
findSessionAsyncin classDecoratedSessionManager<C>- Parameters:
id- a session identifier- Returns:
- an existing web session, or null if none exists
-