Class InfinispanSessionManager<SC,MV,AV,LC>
- java.lang.Object
-
- org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager<SC,MV,AV,LC>
-
- Type Parameters:
SC- the ServletContext specification typeMV- the meta-data value typeAV- the attributes value typeLC- the local context type
- All Implemented Interfaces:
Restartable,ActiveSessionStatistics,SessionManager<LC,TransactionBatch>
public class InfinispanSessionManager<SC,MV,AV,LC> extends Object implements SessionManager<LC,TransactionBatch>
Generic session manager implementation - independent of cache mapping strategy.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description InfinispanSessionManager(SessionFactory<SC,MV,AV,LC> factory, InfinispanSessionManagerConfiguration<SC,LC> configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Session<LC>createSession(String id)Session<LC>findSession(String id)longgetActiveSessionCount()Set<String>getActiveSessions()Batcher<TransactionBatch>getBatcher()DurationgetDefaultMaxInactiveInterval()Supplier<String>getIdentifierFactory()Set<String>getLocalSessions()DurationgetStopTimeout()ImmutableSessionreadSession(String id)CompletionStage<Void>removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<SessionCreationMetaDataKey,?> event)voidsetDefaultMaxInactiveInterval(Duration duration)voidstart()voidstop()
-
-
-
Constructor Detail
-
InfinispanSessionManager
public InfinispanSessionManager(SessionFactory<SC,MV,AV,LC> factory, InfinispanSessionManagerConfiguration<SC,LC> configuration)
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceRestartable
-
stop
public void stop()
- Specified by:
stopin interfaceRestartable
-
getStopTimeout
public Duration getStopTimeout()
- Specified by:
getStopTimeoutin interfaceSessionManager<SC,MV>
-
getBatcher
public Batcher<TransactionBatch> getBatcher()
- Specified by:
getBatcherin interfaceSessionManager<SC,MV>
-
getDefaultMaxInactiveInterval
public Duration getDefaultMaxInactiveInterval()
- Specified by:
getDefaultMaxInactiveIntervalin interfaceSessionManager<SC,MV>
-
setDefaultMaxInactiveInterval
public void setDefaultMaxInactiveInterval(Duration duration)
- Specified by:
setDefaultMaxInactiveIntervalin interfaceSessionManager<SC,MV>
-
getIdentifierFactory
public Supplier<String> getIdentifierFactory()
- Specified by:
getIdentifierFactoryin interfaceSessionManager<SC,MV>
-
findSession
public Session<LC> findSession(String id)
- Specified by:
findSessionin interfaceSessionManager<SC,MV>
-
createSession
public Session<LC> createSession(String id)
- Specified by:
createSessionin interfaceSessionManager<SC,MV>
-
readSession
public ImmutableSession readSession(String id)
- Specified by:
readSessionin interfaceSessionManager<SC,MV>
-
getActiveSessions
public Set<String> getActiveSessions()
- Specified by:
getActiveSessionsin interfaceSessionManager<SC,MV>
-
getLocalSessions
public Set<String> getLocalSessions()
- Specified by:
getLocalSessionsin interfaceSessionManager<SC,MV>
-
getActiveSessionCount
public long getActiveSessionCount()
- Specified by:
getActiveSessionCountin interfaceActiveSessionStatistics
-
removed
public CompletionStage<Void> removed(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent<SessionCreationMetaDataKey,?> event)
-
-