Class InfinispanSessionManager<C,MV,AV,SC>
java.lang.Object
org.wildfly.clustering.session.cache.AbstractSessionManager<C,MV,AV,SC>
org.wildfly.clustering.session.infinispan.embedded.InfinispanSessionManager<C,MV,AV,SC>
- Type Parameters:
C- the session manager context typeMV- the meta-data value typeAV- the attributes value typeSC- the session context type
- All Implemented Interfaces:
Manager<String>,ManagerConfiguration<String>,Service,SessionManager<SC>,SessionStatistics
Generic session manager implementation - independent of cache mapping strategy.
- Author:
- Paul Ferraro
-
Field Summary
Fields inherited from class org.wildfly.clustering.session.cache.AbstractSessionManager
logger -
Constructor Summary
ConstructorsConstructorDescriptionInfinispanSessionManager(SessionManagerConfiguration<C> configuration, InfinispanSessionManagerConfiguration<SC> infinispanConfiguration, SessionFactory<C, MV, AV, SC> factory) -
Method Summary
Modifier and TypeMethodDescriptionReturns the session with the specified identifier, or null if none exists.Returns the identifiers of active sessions managed by this session manager.Returns a batcher for use by users of this manager.Returns a factory for creating identifiers for use by this manager.Returns the identifiers of all sessions managed by this session manager, including passive sessions.Returns statistics for this session manager.booleanIndicates whether or not this service is started.voidstart()Starts this service.voidstop()Stops this service.Methods inherited from class org.wildfly.clustering.session.cache.AbstractSessionManager
createSessionAsync, findImmutableSessionAsync, getDetachedSessionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.session.SessionManager
createSession, findImmutableSession, findSessionMethods inherited from interface org.wildfly.clustering.session.SessionStatistics
getActiveSessionCount
-
Constructor Details
-
InfinispanSessionManager
public InfinispanSessionManager(SessionManagerConfiguration<C> configuration, InfinispanSessionManagerConfiguration<SC> infinispanConfiguration, SessionFactory<C, MV, AV, SC> factory)
-
-
Method Details
-
isStarted
public boolean isStarted()Description copied from interface:ServiceIndicates whether or not this service is started.- Returns:
- true, if this service is started, false otherwise
-
start
public void start()Description copied from interface:ServiceStarts this service. -
stop
public void stop()Description copied from interface:ServiceStops this service. -
getBatchFactory
Description copied from interface:ManagerReturns a batcher for use by users of this manager.- Specified by:
getBatchFactoryin interfaceManager<C>- Overrides:
getBatchFactoryin classAbstractSessionManager<C,MV, AV, SC> - Returns:
- a batcher
-
getIdentifierFactory
Description copied from interface:ManagerConfigurationReturns a factory for creating identifiers for use by this manager.- Specified by:
getIdentifierFactoryin interfaceManagerConfiguration<C>- Overrides:
getIdentifierFactoryin classAbstractSessionManager<C,MV, AV, SC> - Returns:
- an identifier factory
-
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 classAbstractSessionManager<C,MV, AV, SC> - Parameters:
id- a session identifier- Returns:
- an existing web session, or null if none exists
-
getStatistics
Description copied from interface:SessionManagerReturns statistics for this session manager.- Specified by:
getStatisticsin interfaceSessionManager<C>- Overrides:
getStatisticsin classAbstractSessionManager<C,MV, AV, SC> - Returns:
- an object from which statistics can be obtained.
-
getActiveSessions
Description copied from interface:SessionStatisticsReturns the identifiers of active sessions managed by this session manager.- Returns:
- a set of session identifiers.
-
getSessions
Description copied from interface:SessionStatisticsReturns the identifiers of all sessions managed by this session manager, including passive sessions.- Returns:
- a set of session identifiers.
-