Class InfinispanUserContextFactory<PC,PV,TC>
java.lang.Object
org.wildfly.clustering.session.infinispan.embedded.user.InfinispanUserContextFactory<PC,PV,TC>
- Type Parameters:
PC- the persistent context typePV- the marshalled persistent context typeTC- the transient context type
- All Implemented Interfaces:
CacheEntryCreator<String,,UserContext<PV, TC>, PC> CacheEntryLocator<String,,UserContext<PV, TC>> CacheEntryRemover<String>,UserContextFactory<UserContext<PV,TC>, PC, TC>
public class InfinispanUserContextFactory<PC,PV,TC>
extends Object
implements UserContextFactory<UserContext<PV,TC>,PC,TC>
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionInfinispanUserContextFactory(EmbeddedCacheConfiguration configuration, Marshaller<PC, PV> marshaller, Supplier<TC> contextFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateUserContext(UserContext<PV, TC> entry) createValueAsync(String id, PC context) Creates a value in the cache, if it does not already exist.findValueAsync(String id) Locates the value in the cache with the specified identifier.removeAsync(String id) Removes the specified entry from the cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.cache.CacheEntryCreator
createValueMethods inherited from interface org.wildfly.clustering.cache.CacheEntryLocator
findValue, tryValue, tryValueAsyncMethods inherited from interface org.wildfly.clustering.cache.CacheEntryRemover
purge, purgeAsync, remove
-
Constructor Details
-
InfinispanUserContextFactory
public InfinispanUserContextFactory(EmbeddedCacheConfiguration configuration, Marshaller<PC, PV> marshaller, Supplier<TC> contextFactory)
-
-
Method Details
-
createValueAsync
Description copied from interface:CacheEntryCreatorCreates a value in the cache, if it does not already exist.- Specified by:
createValueAsyncin interfaceCacheEntryCreator<PC,PV, TC> - Parameters:
id- the cache entry identifier.context- the context of the created value- Returns:
- the new value, or the existing value the cache entry already exists.
-
findValueAsync
Description copied from interface:CacheEntryLocatorLocates the value in the cache with the specified identifier.- Specified by:
findValueAsyncin interfaceCacheEntryLocator<PC,PV> - Parameters:
id- the cache entry identifier- Returns:
- the value of the cache entry, or null if not found.
-
removeAsync
Description copied from interface:CacheEntryRemoverRemoves the specified entry from the cache.- Specified by:
removeAsyncin interfaceCacheEntryRemover<PC>- Parameters:
id- the cache entry identifier.- Returns:
- true, if the entry was removed.
-
createUserContext
- Specified by:
createUserContextin interfaceUserContextFactory<PC,PV, TC>
-