Package org.wildfly.clustering.session
Interface SessionManager<C,B extends org.wildfly.clustering.cache.batch.Batch>
- Type Parameters:
C- the session context typeB- the batch type
- All Superinterfaces:
Manager<String,,B> ManagerConfiguration<String>,Restartable
public interface SessionManager<C,B extends org.wildfly.clustering.cache.batch.Batch>
extends Manager<String,B>
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptioncreateSession(String id) Creates a session using the specified identifier.Creates a session using the specified identifier.default ImmutableSessionReturns a read-only view of the session with the specified identifier.Returns a read-only view of the session with the specified identifier.findSession(String id) Returns the session with the specified identifier, or null if none exists.Returns the session with the specified identifier, or null if none exists.Returns a detached session with the specified identifier.Returns statistics for this session manager.Methods inherited from interface org.wildfly.clustering.server.manager.Manager
getBatcherMethods inherited from interface org.wildfly.clustering.server.manager.ManagerConfiguration
getIdentifierFactoryMethods inherited from interface org.wildfly.clustering.server.manager.Restartable
start, stop
-
Method Details
-
createSession
Creates a session using the specified identifier. Sessions returned by this method must be closed viaRegistration.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
Creates a session using the specified identifier. Sessions returned by this method must be closed viaRegistration.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.
-
findSession
Returns the session with the specified identifier, or null if none exists. Sessions returned by this method must be closed viaRegistration.close(). This method is intended to be invoked within the context of a batch.- Parameters:
id- a session identifier- Returns:
- an existing web session, or null if none exists
-
findSessionAsync
Returns the session with the specified identifier, or null if none exists. Sessions returned by this method must be closed viaRegistration.close(). This method is intended to be invoked within the context of a batch.- Parameters:
id- a session identifier- Returns:
- an existing web session, or null if none exists
-
findImmutableSession
Returns a read-only view of the session with the specified identifier. This method is intended to be invoked within the context of a batch- Parameters:
id- a unique session identifier- Returns:
- a read-only session or null if none exists
-
findImmutableSessionAsync
Returns a read-only view of the session with the specified identifier. This method is intended to be invoked within the context of a batch- Parameters:
id- a unique session identifier- Returns:
- a read-only session or null if none exists
-
getDetachedSession
Returns a detached session with the specified identifier. A detached session is only valid if a session exists for the given identifier.- Parameters:
id- the session identifier of the detached session- Returns:
- a detached session
-
getStatistics
SessionStatistics getStatistics()Returns statistics for this session manager.- Returns:
- an object from which statistics can be obtained.
-