Class FineSessionAttributesFactory<C,V>
java.lang.Object
org.wildfly.clustering.session.infinispan.remote.attributes.FineSessionAttributesFactory<C,V>
- Type Parameters:
C- the session manager context typeV- the cache value type
- All Implemented Interfaces:
AutoCloseable,org.wildfly.clustering.cache.CacheEntryCreator<String,,Map<String, Object>, Void> org.wildfly.clustering.cache.CacheEntryLocator<String,,Map<String, Object>> org.wildfly.clustering.cache.CacheEntryRemover<String>,org.wildfly.clustering.server.Registration,ImmutableSessionAttributesFactory<Map<String,,Object>> SessionAttributesFactory<C,Map<String, Object>>
public class FineSessionAttributesFactory<C,V>
extends Object
implements SessionAttributesFactory<C,Map<String,Object>>
SessionAttributesFactory for fine granularity sessions, where all session attributes are stored in a single cache entry,
but changes are applied by functions such that only modified and mutated values ever replicate/persist.
This implementation is unsuited for attributes that strongly reference each other.- Author:
- Paul Ferraro
-
Field Summary
Fields inherited from interface org.wildfly.clustering.server.Registration
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionFineSessionAttributesFactory(SessionAttributesFactoryConfiguration<Object, V> configuration, BiFunction<org.wildfly.clustering.session.ImmutableSession, C, SessionAttributeActivationNotifier> notifierFactory, RemoteCacheConfiguration hotrod) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createImmutableSessionAttributes(String id, Map<String, Object> attributes) createSessionAttributes(String id, Map<String, Object> attributes, org.wildfly.clustering.session.ImmutableSessionMetaData metaData, C context) createValue(String id, Void context) createValueAsync(String id, Void context) findValueAsync(String id) removeAsync(String id) tryValueAsync(String id) 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.CacheEntryLocator
findValue, tryValueMethods inherited from interface org.wildfly.clustering.cache.CacheEntryRemover
purge, purgeAsync, remove
-
Constructor Details
-
FineSessionAttributesFactory
public FineSessionAttributesFactory(SessionAttributesFactoryConfiguration<Object, V> configuration, BiFunction<org.wildfly.clustering.session.ImmutableSession, C, SessionAttributeActivationNotifier> notifierFactory, RemoteCacheConfiguration hotrod)
-
-
Method Details
-
createValue
-
createValueAsync
-
findValueAsync
-
tryValueAsync
-
removeAsync
- Specified by:
removeAsyncin interfaceorg.wildfly.clustering.cache.CacheEntryRemover<C>
-
createSessionAttributes
public SessionAttributes createSessionAttributes(String id, Map<String, Object> attributes, org.wildfly.clustering.session.ImmutableSessionMetaData metaData, C context) - Specified by:
createSessionAttributesin interfaceSessionAttributesFactory<C,V>
-
createImmutableSessionAttributes
public Map<String,Object> createImmutableSessionAttributes(String id, Map<String, Object> attributes) - Specified by:
createImmutableSessionAttributesin interfaceImmutableSessionAttributesFactory<C>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.wildfly.clustering.server.Registration
-