public interface SessionManager<L,B extends Batch> extends IdentifierFactory<String>
| 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.
|
long |
getDefaultMaxInactiveInterval(TimeUnit unit)
Returns the default maximum inactive interval, using the specified unit, 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(long value,
TimeUnit unit)
Set the default maximum inactive interval, using the specified unit, 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, stopboolean 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 identifierlong getDefaultMaxInactiveInterval(TimeUnit unit)
unit - a time unitvoid setDefaultMaxInactiveInterval(long value,
TimeUnit unit)
unit - a time unitBatcher<B> getBatcher()
Set<String> getActiveSessions()
Set<String> getLocalSessions()
ImmutableSession viewSession(String id)
id - a unique session identifierCopyright © 2015 JBoss by Red Hat. All rights reserved.