Interface SessionFactory<DC,MV,AV,SC>

Type Parameters:
DC - the deployment context type
MV - the meta-data value type
AV - the attributes value type
SC - 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 Details

    • createEntry

      Specified by:
      createEntry in interface org.wildfly.clustering.cache.BiCacheEntryCreator<DC,MV,AV,SC>
    • removeAsync

      default CompletionStage<Void> removeAsync(String id)
      Specified by:
      removeAsync in interface org.wildfly.clustering.cache.CacheEntryRemover<DC>
    • purgeAsync

      default CompletionStage<Void> purgeAsync(String id)
      Specified by:
      purgeAsync in interface org.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 identifier
      entry - a map entry containing the metadata and attributes of the session
      context - the session context
      Returns:
      a session from the specified identifier, metadata, attributes, and context.
    • close

      default void close()
      Specified by:
      close in interface AutoCloseable