Interface SessionManager<L,B extends Batch>
- Type Parameters:
L- the local context typeB- the batch type
- All Superinterfaces:
ActiveSessionStatistics,Restartable
SPI for a distributable session manager.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptioncreateSession(String id) Creates a session using the specified identifier.findSession(String id) Returns the session with the specified identifier, or null if none exists.Returns the identifiers of those sessions that are active on this node.Exposes the batching mechanism used by this session manager.Returns the identifier factory of this session manager.Returns the identifiers of all sessions on this node, including both active and passive sessions.The maximum duration of time to wait for the completion of requests before the session manager can be stopped.readSession(String id) Returns a read-only view of the session with the specified identifier.Methods inherited from interface org.wildfly.clustering.web.session.ActiveSessionStatistics
getActiveSessionCountMethods inherited from interface org.wildfly.clustering.ee.Restartable
start, stop
-
Method Details
-
findSession
Returns 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.- Parameters:
id- a session identifier- Returns:
- an existing web session, or null if none exists
-
createSession
Creates 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.
-
getBatcher
Exposes the batching mechanism used by this session manager.- Returns:
- a batcher.
-
getActiveSessions
Returns the identifiers of those sessions that are active on this node.- Returns:
- a set of session identifiers.
-
getLocalSessions
Returns the identifiers of all sessions on this node, including both active and passive sessions.- Returns:
- a set of session identifiers.
-
readSession
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
-
getStopTimeout
Duration getStopTimeout()The maximum duration of time to wait for the completion of requests before the session manager can be stopped.- Returns:
- a duration
-
getIdentifierFactory
Returns the identifier factory of this session manager.- Returns:
- an identifier factory
-