Interface UserFactory<CV,C,T,SV,D,S>
- Type Parameters:
CV- the user context value typeC- the persistent context typeT- the transient context typeSV- the user sessions value typeD- the deployment typeS- the session type
- All Superinterfaces:
BiCacheEntryCreator<String,CV, SV, C>, BiCacheEntryLocator<String, CV, SV>, CacheEntryCreator<String, Map.Entry<CV, SV>, C>, CacheEntryLocator<String, Map.Entry<CV, SV>>, CacheEntryRemover<String>
- All Known Implementing Classes:
CompositeUserFactory
public interface UserFactory<CV,C,T,SV,D,S>
extends BiCacheEntryCreator<String,CV,SV,C>, BiCacheEntryLocator<String,CV,SV>, CacheEntryRemover<String>
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault Map.Entry<CompletionStage<CV>, CompletionStage<SV>> createEntry(String id, C context) Creates a value in the cache, if it does not already exist.createUser(String id, Map.Entry<CV, SV> value) Creates a user from its composing cache entries.default Map.Entry<CompletionStage<CV>, CompletionStage<SV>> Locates the value in the cache with the specified identifier.Returns the properties of the cache.Returns the user context factory.Returns the user sessions factory.default CompletionStage<Void> purgeAsync(String id) Removes the specified entry from the cache.default CompletionStage<Void> removeAsync(String id) Removes the specified entry from the cache.default Map.Entry<CompletionStage<CV>, CompletionStage<SV>> Locates the value in the cache with the specified identifier, if available.Methods inherited from interface BiCacheEntryCreator
createValueAsyncMethods inherited from interface BiCacheEntryLocator
findValueAsync, tryValueAsyncMethods inherited from interface CacheEntryCreator
createValueMethods inherited from interface CacheEntryLocator
findValue, tryValueMethods inherited from interface CacheEntryRemover
purge, remove
-
Method Details
-
getUserContextFactory
UserContextFactory<CV,C, getUserContextFactory()T> Returns the user context factory.- Returns:
- the user context factory.
-
getUserSessionsFactory
UserSessionsFactory<SV,D, getUserSessionsFactory()S> Returns the user sessions factory.- Returns:
- the user sessions factory.
-
getCacheProperties
CacheProperties getCacheProperties()Returns the properties of the cache.- Returns:
- the properties of the cache.
-
createUser
-
createEntry
Description copied from interface:BiCacheEntryCreatorCreates a value in the cache, if it does not already exist.- Specified by:
createEntryin interfaceBiCacheEntryCreator<CV,C, T, SV> - Parameters:
id- the cache entry identifier.context- the creation context- Returns:
- the new value, or the existing value the cache entry already exists.
-
findEntry
Description copied from interface:BiCacheEntryLocatorLocates the value in the cache with the specified identifier.- Specified by:
findEntryin interfaceBiCacheEntryLocator<CV,C, T> - 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<CV,C, T> - Parameters:
id- the cache entry identifier- Returns:
- the value of the cache entry, or null if not found or is in use.
-
removeAsync
Description copied from interface:CacheEntryRemoverRemoves the specified entry from the cache.- Specified by:
removeAsyncin interfaceCacheEntryRemover<CV>- Parameters:
id- the cache entry identifier.- Returns:
- true, if the entry was removed.
-
purgeAsync
Description copied from interface:CacheEntryRemoverRemoves the specified entry from the cache.- Specified by:
purgeAsyncin interfaceCacheEntryRemover<CV>- Parameters:
id- the cache entry identifier.- Returns:
- true, if the entry was removed.
-