Interface ImmutableSessionFactory<MV,AV>

Type Parameters:
MV - the session metadata value type
AV - the session attribute value type
All Superinterfaces:
BiCacheEntryLocator<String,MV,AV>, CacheEntryLocator<String, Map.Entry<MV,AV>>, ImmutableSessionFactoryConfiguration<MV,AV>
All Known Subinterfaces:
SessionFactory<DC,MV,AV,SC>
All Known Implementing Classes:
CompositeImmutableSessionFactory, CompositeSessionFactory, HotRodSessionFactory

public interface ImmutableSessionFactory<MV,AV> extends ImmutableSessionFactoryConfiguration<MV,AV>, BiCacheEntryLocator<String,MV,AV>
Factory for creating an ImmutableSession.
Author:
Paul Ferraro
  • Method Details

    • findEntry

      default Map.Entry<CompletionStage<MV>, CompletionStage<AV>> findEntry(String id)
      Description copied from interface: BiCacheEntryLocator
      Locates the value in the cache with the specified identifier.
      Specified by:
      findEntry in interface BiCacheEntryLocator<String,MV,AV>
      Parameters:
      id - the cache entry identifier
      Returns:
      the value of the cache entry, or null if not found.
    • tryEntry

      default Map.Entry<CompletionStage<MV>, CompletionStage<AV>> tryEntry(String id)
      Description copied from interface: BiCacheEntryLocator
      Locates the value in the cache with the specified identifier, if available.
      Specified by:
      tryEntry in interface BiCacheEntryLocator<String,MV,AV>
      Parameters:
      id - the cache entry identifier
      Returns:
      the value of the cache entry, or null if not found or is in use.
    • createImmutableSession

      default ImmutableSession createImmutableSession(String id, Map.Entry<MV,AV> entry)
      Creates an immutable session from the specified identifier and metadata/attribute entry.
      Parameters:
      id - a session identifier
      entry - a map entry containing the metadata and attributes of the session
      Returns:
      an immutable session
    • createImmutableSession

      ImmutableSession createImmutableSession(String id, ImmutableSessionMetaData metaData, Map<String,Object> attributes)
      Creates an immutable session from the specified identifier, metadata, and attributes.
      Parameters:
      id - the identifier of this session
      metaData - the metadata of this session
      attributes - the attributes of this session
      Returns:
      an immutable session