Interface SessionFactory<DC,MV,AV,SC>
- Type Parameters:
DC- the deployment context typeMV- the meta-data value typeAV- the attributes value typeSC- the session context type
- All Superinterfaces:
AutoCloseable, org.wildfly.clustering.cache.BiCacheEntryCreator<String, MV, AV, Map.Entry<Instant, Optional<Duration>>>, org.wildfly.clustering.cache.BiCacheEntryLocator<String,MV, AV>, org.wildfly.clustering.cache.CacheEntryCreator<String, Map.Entry<MV, AV>, Map.Entry<Instant, Optional<Duration>>>, org.wildfly.clustering.cache.CacheEntryLocator<String, Map.Entry<MV, AV>>, org.wildfly.clustering.cache.CacheEntryRemover<String>, ImmutableSessionFactory<MV, AV>, ImmutableSessionFactoryConfiguration<MV, AV>, SessionFactoryConfiguration<DC, MV, AV, SC>
- All Known Implementing Classes:
CompositeSessionFactory
public interface SessionFactory<DC,MV,AV,SC>
extends ImmutableSessionFactory<MV,AV>, SessionFactoryConfiguration<DC,MV,AV,SC>, org.wildfly.clustering.cache.BiCacheEntryCreator<String, MV, AV, Map.Entry<Instant, Optional<Duration>>>, org.wildfly.clustering.cache.CacheEntryRemover<String>, AutoCloseable
Factory for creating sessions. Encapsulates the cache mapping strategy for sessions.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default Map.Entry<CompletionStage<MV>, CompletionStage<AV>> org.wildfly.clustering.session.Session<SC> Creates a session from the specified identifier, metadata, attributes, and context.default CompletionStage<Void> purgeAsync(String id) default CompletionStage<Void> removeAsync(String id) Methods inherited from interface org.wildfly.clustering.cache.BiCacheEntryCreator
createValueAsyncMethods inherited from interface org.wildfly.clustering.cache.BiCacheEntryLocator
findValueAsync, tryValueAsyncMethods inherited from interface org.wildfly.clustering.cache.CacheEntryCreator
createValueMethods inherited from interface org.wildfly.clustering.cache.CacheEntryLocator
findValue, tryValueMethods inherited from interface org.wildfly.clustering.cache.CacheEntryRemover
purge, removeMethods inherited from interface ImmutableSessionFactory
createImmutableSession, createImmutableSession, findEntry, tryEntryMethods inherited from interface ImmutableSessionFactoryConfiguration
getCachePropertiesMethods inherited from interface SessionFactoryConfiguration
getSessionAttributesFactory, getSessionContextFactory, getSessionMetaDataFactory
-
Method Details
-
createEntry
-
removeAsync
- Specified by:
removeAsyncin interfaceorg.wildfly.clustering.cache.CacheEntryRemover<DC>
-
purgeAsync
- Specified by:
purgeAsyncin interfaceorg.wildfly.clustering.cache.CacheEntryRemover<DC>
-
createSession
org.wildfly.clustering.session.Session<SC> createSession(String id, Map.Entry<MV, AV> entry, DC context) Creates a session from the specified identifier, metadata, attributes, and context.- Parameters:
id- a session identifierentry- a map entry containing the metadata and attributes of the sessioncontext- the session context- Returns:
- a session from the specified identifier, metadata, attributes, and context.
-
close
default void close()- Specified by:
closein interfaceAutoCloseable
-