Class InfinispanSessionMetaDataFactory<C>
java.lang.Object
org.wildfly.clustering.session.infinispan.embedded.metadata.InfinispanSessionMetaDataFactory<C>
- Type Parameters:
C- the session context type
- All Implemented Interfaces:
AutoCloseable,CacheEntryCreator<String,,ContextualSessionMetaDataEntry<C>, Duration> CacheEntryLocator<String,,ContextualSessionMetaDataEntry<C>> CacheEntryRemover<String>,ImmutableSessionMetaDataFactory<ContextualSessionMetaDataEntry<C>>,SessionMetaDataFactory<ContextualSessionMetaDataEntry<C>>
public class InfinispanSessionMetaDataFactory<C>
extends Object
implements SessionMetaDataFactory<ContextualSessionMetaDataEntry<C>>
- Author:
- Paul Ferraro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createSessionMetaData(String id, ContextualSessionMetaDataEntry<C> entry) createValueAsync(String id, Duration defaultTimeout) 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.purgeAsync(String id) Removes the specified entry from the cache.removeAsync(String id) Removes the specified entry from the cache.tryValueAsync(String id) Returns the value for the specified key, if possible without contention.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, tryValueMethods inherited from interface org.wildfly.clustering.cache.CacheEntryRemover
purge, remove
-
Constructor Details
-
InfinispanSessionMetaDataFactory
-
-
Method Details
-
createValueAsync
public CompletionStage<ContextualSessionMetaDataEntry<C>> createValueAsync(String id, Duration defaultTimeout) Description copied from interface:CacheEntryCreatorCreates a value in the cache, if it does not already exist.- Specified by:
createValueAsyncin interfaceCacheEntryCreator<String,ContextualSessionMetaDataEntry<C>, Duration> - Parameters:
id- the cache entry identifier.defaultTimeout- 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<String,ContextualSessionMetaDataEntry<C>> - Parameters:
id- the cache entry identifier- Returns:
- the value of the cache entry, or null if not found.
-
tryValueAsync
Description copied from interface:CacheEntryLocatorReturns the value for the specified key, if possible without contention.- Specified by:
tryValueAsyncin interfaceCacheEntryLocator<String,ContextualSessionMetaDataEntry<C>> - Parameters:
id- a logical key- Returns:
- the value of the cache entry, or null if not found or unavailable.
-
removeAsync
Description copied from interface:CacheEntryRemoverRemoves the specified entry from the cache.- Specified by:
removeAsyncin interfaceCacheEntryRemover<C>- 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<C>- Parameters:
id- the cache entry identifier.- Returns:
- true, if the entry was removed.
-
createImmutableSessionMetaData
public ImmutableSessionMetaData createImmutableSessionMetaData(String id, ContextualSessionMetaDataEntry<C> entry) - Specified by:
createImmutableSessionMetaDatain interfaceImmutableSessionMetaDataFactory<C>
-
createSessionMetaData
public InvalidatableSessionMetaData createSessionMetaData(String id, ContextualSessionMetaDataEntry<C> entry) - Specified by:
createSessionMetaDatain interfaceSessionMetaDataFactory<C>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSessionMetaDataFactory<C>
-