Class HotRodUserSessionsFactory<D,S>
java.lang.Object
org.wildfly.clustering.session.infinispan.remote.user.HotRodUserSessionsFactory<D,S>
- Type Parameters:
D- the deployment typeS- the session type
- All Implemented Interfaces:
CacheEntryCreator<String,Map<D, S>, Void>, CacheEntryLocator<String, Map<D, S>>, CacheEntryRemover<String>, UserSessionsFactory<Map<D, S>, D, S>
public class HotRodUserSessionsFactory<D,S>
extends Object
implements UserSessionsFactory<Map<D,S>,D,S>
A user sessions factory.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionHotRodUserSessionsFactory(RemoteCacheConfiguration configuration) Creates a user sessions factory -
Method Summary
Modifier and TypeMethodDescriptioncreateUserSessions(String id, Map<D, S> value) Creates user sessions from the specified cache value.createValue(String id, Void context) Creates a value in the cache, if it does not already exist.CompletionStage<Map<D, S>> createValueAsync(String id, Void context) Creates a value in the cache, if it does not already exist.CompletionStage<Map<D, S>> 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CacheEntryLocator
findValue, tryValue, tryValueAsyncMethods inherited from interface CacheEntryRemover
purge, purgeAsync, remove
-
Constructor Details
-
HotRodUserSessionsFactory
Creates a user sessions factory- Parameters:
configuration- the configuration associated with the cache
-
-
Method Details
-
createUserSessions
Description copied from interface:UserSessionsFactoryCreates user sessions from the specified cache value.- Specified by:
createUserSessionsin interfaceUserSessionsFactory<Map<D,S>, D, S> - Parameters:
id- the identifier of the uservalue- the cache value- Returns:
- user sessions
-
createValue
Description copied from interface:CacheEntryCreatorCreates a value in the cache, if it does not already exist.- Specified by:
createValuein interfaceCacheEntryCreator<String,Map<D, S>, Void> - 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.
-
createValueAsync
Description copied from interface:CacheEntryCreatorCreates a value in the cache, if it does not already exist.- Specified by:
createValueAsyncin interfaceCacheEntryCreator<String,Map<D, S>, Void> - 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<D,S> - 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<D>- Parameters:
id- the cache entry identifier.- Returns:
- true, if the entry was removed.
-