public interface SessionManager<L,B extends Batch> extends IdentifierFactory<String>, ActiveSessionStatistics
Modifier and Type | Method and Description |
---|---|
boolean |
containsSession(String id)
Indicates whether or not the session with the specified identifier is known to this session manager.
|
Session<L> |
createSession(String id)
Returns the session with the specified identifier, creating one if necessary
Sessions returned by this method must be closed via
Session.close() . |
Session<L> |
findSession(String id)
Returns the session with the specified identifier, or null if none exists.
|
Set<String> |
getActiveSessions()
Returns the identifiers of those sessions that are active on this node.
|
Batcher<B> |
getBatcher()
Exposes the batching mechanism used by this session manager.
|
Duration |
getDefaultMaxInactiveInterval()
Returns the default maximum inactive interval, as a duration, for all sessions created by this session manager.
|
Set<String> |
getLocalSessions()
Returns the identifiers of all sessions on this node, including both active and passive sessions.
|
void |
setDefaultMaxInactiveInterval(Duration duration)
Set the default maximum inactive interval, using the specified time duration, for all sessions created by this session manager.
|
ImmutableSession |
viewSession(String id)
Returns a read-only view of the session with the specified identifier.
|
createIdentifier, start, stop
getActiveSessionCount, getMaxActiveSessions
boolean containsSession(String id)
id
- a unique session identifierSession<L> findSession(String id)
Session.close()
.
This method is intended to be invoked within the context of a batch.id
- a session identifierSession<L> createSession(String id)
Session.close()
.
This method is intended to be invoked within the context of a batch.id
- a session identifierDuration getDefaultMaxInactiveInterval()
void setDefaultMaxInactiveInterval(Duration duration)
duration
- a time durationBatcher<B> getBatcher()
Set<String> getActiveSessions()
Set<String> getLocalSessions()
ImmutableSession viewSession(String id)
id
- a unique session identifierCopyright © 2017 JBoss by Red Hat. All rights reserved.