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>
Creates an
User from its cache storage value.- 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) createUserAsync(String id, Map.Entry<CompletionStage<CV>, CompletionStage<SV>> entry) default Map.Entry<CompletionStage<CV>,CompletionStage<SV>> Locates the value in the cache with the specified identifier.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 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, remove
-
Method Details
-
getUserContextFactory
UserContextFactory<CV,C, getUserContextFactory()T> -
getUserSessionsFactory
UserSessionsFactory<SV,D, getUserSessionsFactory()S> -
createUser
-
createUserAsync
default CompletionStage<User<C,T, createUserAsyncD, S>> (String id, Map.Entry<CompletionStage<CV>, CompletionStage<SV>> entry) -
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.
-