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 type
PV - the marshalled persistent context type
TC - the transient context type
All Implemented Interfaces:
org.wildfly.clustering.cache.CacheEntryCreator<String, org.wildfly.clustering.session.cache.user.UserContext<PV,TC>, PC>, org.wildfly.clustering.cache.CacheEntryLocator<String, org.wildfly.clustering.session.cache.user.UserContext<PV,TC>>, org.wildfly.clustering.cache.CacheEntryRemover<String>, org.wildfly.clustering.session.cache.user.UserContextFactory<org.wildfly.clustering.session.cache.user.UserContext<PV,TC>, PC, TC>

public class InfinispanUserContextFactory<PC,PV,TC> extends Object implements org.wildfly.clustering.session.cache.user.UserContextFactory<org.wildfly.clustering.session.cache.user.UserContext<PV,TC>, PC, TC>
The factory for creating the context of a user.
Author:
Paul Ferraro
  • Constructor Details

    • InfinispanUserContextFactory

      public InfinispanUserContextFactory(org.wildfly.clustering.cache.infinispan.embedded.EmbeddedCacheConfiguration configuration, org.wildfly.clustering.marshalling.Marshaller<PC,PV> marshaller, Supplier<TC> contextFactory)
      Creates a user context factory
      Parameters:
      configuration - the configuration for the associated cache
      marshaller - a marshaller for the persistent context of a user
      contextFactory - a factory for creating the user context
  • Method Details

    • createValueAsync

      public CompletionStage<org.wildfly.clustering.session.cache.user.UserContext<PV,TC>> createValueAsync(String id, PC context)
      Specified by:
      createValueAsync in interface org.wildfly.clustering.cache.CacheEntryCreator<PC,PV,TC>
    • findValueAsync

      public CompletionStage<org.wildfly.clustering.session.cache.user.UserContext<PV,TC>> findValueAsync(String id)
      Specified by:
      findValueAsync in interface org.wildfly.clustering.cache.CacheEntryLocator<PC,PV>
    • removeAsync

      public CompletionStage<Void> removeAsync(String id)
      Specified by:
      removeAsync in interface org.wildfly.clustering.cache.CacheEntryRemover<PC>
    • createUserContext

      public Map.Entry<PC,TC> createUserContext(org.wildfly.clustering.session.cache.user.UserContext<PV,TC> entry)
      Specified by:
      createUserContext in interface org.wildfly.clustering.session.cache.user.UserContextFactory<PC,PV,TC>