public class InfinispanSessionManager<V,L> extends Object implements SessionManager<L>, org.infinispan.notifications.KeyFilter
| Constructor and Description |
|---|
InfinispanSessionManager(SessionContext context,
IdentifierFactory<String> identifierFactory,
org.infinispan.Cache<String,V> cache,
SessionFactory<V,L> factory,
Batcher batcher,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Object key) |
void |
activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<String,?> 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(). |
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 |
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 |
passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<String,?> event) |
void |
removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<String,?> event) |
void |
setDefaultMaxInactiveInterval(long value,
TimeUnit unit)
Set the default maximum inactive interval, using the specified unit, for all sessions created by this session manager.
|
void |
start() |
void |
stop() |
void |
topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<String,?> event) |
ImmutableSession |
viewSession(String id)
Returns a read-only view of the session with the specified identifier.
|
public InfinispanSessionManager(SessionContext context, IdentifierFactory<String> identifierFactory, org.infinispan.Cache<String,V> cache, SessionFactory<V,L> factory, Batcher batcher, org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
public void start()
start in interface IdentifierFactory<String>public void stop()
stop in interface IdentifierFactory<String>public boolean accept(Object key)
accept in interface org.infinispan.notifications.KeyFilterpublic Batcher getBatcher()
SessionManagergetBatcher in interface SessionManager<L>public long getDefaultMaxInactiveInterval(TimeUnit unit)
SessionManagergetDefaultMaxInactiveInterval in interface SessionManager<L>unit - a time unitpublic void setDefaultMaxInactiveInterval(long value,
TimeUnit unit)
SessionManagersetDefaultMaxInactiveInterval in interface SessionManager<L>unit - a time unitpublic String createIdentifier()
createIdentifier in interface IdentifierFactory<String>public boolean containsSession(String id)
SessionManagercontainsSession in interface SessionManager<L>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>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>id - a session identifierpublic ImmutableSession viewSession(String id)
SessionManagerviewSession in interface SessionManager<L>id - a unique session identifierpublic Set<String> getActiveSessions()
SessionManagergetActiveSessions in interface SessionManager<L>public Set<String> getLocalSessions()
SessionManagergetLocalSessions in interface SessionManager<L>public void activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<String,?> event)
public void passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<String,?> event)
public void removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<String,?> event)
public void topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<String,?> event)
Copyright © 2014 JBoss by Red Hat. All rights reserved.