public class InfinispanSessionManager<MV,AV,L> extends Object implements SessionManager<L,TransactionBatch>
| Constructor and Description |
|---|
InfinispanSessionManager(SessionFactory<MV,AV,L> factory,
InfinispanSessionManagerConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<SessionCreationMetaDataKey,?> event) |
boolean |
containsSession(String id)
Indicates whether or not the session with the specified identifier is known to this session manager.
|
String |
createIdentifier() |
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(). |
void |
dataRehashed(org.infinispan.notifications.cachelistener.event.DataRehashedEvent<SessionCreationMetaDataKey,?> event) |
Session<L> |
findSession(String id)
Returns the session with the specified identifier, or null if none exists.
|
long |
getActiveSessionCount() |
Set<String> |
getActiveSessions()
Returns the identifiers of those sessions that are active on this node.
|
Batcher<TransactionBatch> |
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.
|
int |
getMaxActiveSessions() |
void |
passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<SessionCreationMetaDataKey,?> event) |
void |
removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<SessionCreationMetaDataKey,?> event) |
void |
setDefaultMaxInactiveInterval(Duration duration)
Set the default maximum inactive interval, using the specified time duration, for all sessions created by this session manager.
|
void |
start() |
void |
stop() |
ImmutableSession |
viewSession(String id)
Returns a read-only view of the session with the specified identifier.
|
public InfinispanSessionManager(SessionFactory<MV,AV,L> factory, InfinispanSessionManagerConfiguration configuration)
public void start()
start in interface IdentifierFactory<String>public void stop()
stop in interface IdentifierFactory<String>public Batcher<TransactionBatch> getBatcher()
SessionManagergetBatcher in interface SessionManager<L,TransactionBatch>public Duration getDefaultMaxInactiveInterval()
SessionManagergetDefaultMaxInactiveInterval in interface SessionManager<L,TransactionBatch>public void setDefaultMaxInactiveInterval(Duration duration)
SessionManagersetDefaultMaxInactiveInterval in interface SessionManager<L,TransactionBatch>duration - a time durationpublic String createIdentifier()
createIdentifier in interface IdentifierFactory<String>public boolean containsSession(String id)
SessionManagercontainsSession in interface SessionManager<L,TransactionBatch>id - a unique session identifierpublic Session<L> findSession(String id)
SessionManagerSession.close().
This method is intended to be invoked within the context of a batch.findSession in interface SessionManager<L,TransactionBatch>id - a session identifierpublic Session<L> createSession(String id)
SessionManagerSession.close().
This method is intended to be invoked within the context of a batch.createSession in interface SessionManager<L,TransactionBatch>id - a session identifierpublic ImmutableSession viewSession(String id)
SessionManagerviewSession in interface SessionManager<L,TransactionBatch>id - a unique session identifierpublic Set<String> getActiveSessions()
SessionManagergetActiveSessions in interface SessionManager<L,TransactionBatch>public Set<String> getLocalSessions()
SessionManagergetLocalSessions in interface SessionManager<L,TransactionBatch>public int getMaxActiveSessions()
getMaxActiveSessions in interface ActiveSessionStatisticspublic long getActiveSessionCount()
getActiveSessionCount in interface ActiveSessionStatisticspublic void activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<SessionCreationMetaDataKey,?> event)
public void passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<SessionCreationMetaDataKey,?> event)
public void removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<SessionCreationMetaDataKey,?> event)
public void dataRehashed(org.infinispan.notifications.cachelistener.event.DataRehashedEvent<SessionCreationMetaDataKey,?> event)
Copyright © 2022 JBoss by Red Hat. All rights reserved.