Interface ImmutableSessionFactory<MV,AV>
- Type Parameters:
MV- the session metadata value typeAV- 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 Summary
Modifier and TypeMethodDescriptiondefault ImmutableSessioncreateImmutableSession(String id, Map.Entry<MV, AV> entry) Creates an immutable session from the specified identifier and metadata/attribute entry.createImmutableSession(String id, ImmutableSessionMetaData metaData, Map<String, Object> attributes) Creates an immutable session from the specified identifier, metadata, and attributes.default Map.Entry<CompletionStage<MV>, CompletionStage<AV>> Locates the value in the cache with the specified identifier.default Map.Entry<CompletionStage<MV>, CompletionStage<AV>> Locates the value in the cache with the specified identifier, if available.Methods inherited from interface BiCacheEntryLocator
findValueAsync, tryValueAsyncMethods inherited from interface CacheEntryLocator
findValue, tryValueMethods inherited from interface ImmutableSessionFactoryConfiguration
getCacheProperties, getSessionAttributesFactory, getSessionMetaDataFactory
-
Method Details
-
findEntry
Description copied from interface:BiCacheEntryLocatorLocates the value in the cache with the specified identifier.- Specified by:
findEntryin interfaceBiCacheEntryLocator<String,MV, AV> - Parameters:
id- the cache entry identifier- Returns:
- the value of the cache entry, or null if not found.
-
tryEntry
Description copied from interface:BiCacheEntryLocatorLocates the value in the cache with the specified identifier, if available.- Specified by:
tryEntryin interfaceBiCacheEntryLocator<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
Creates an immutable session from the specified identifier and metadata/attribute entry.- Parameters:
id- a session identifierentry- 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 sessionmetaData- the metadata of this sessionattributes- the attributes of this session- Returns:
- an immutable session
-