use of org.wildfly.clustering.web.infinispan.sso.coarse.CoarseSessionsFactory in project wildfly by wildfly.
the class InfinispanSSOManagerFactory method createSSOManager.
@Override
public <L, C extends Marshallability> SSOManager<A, D, S, L, TransactionBatch> createSSOManager(SSOManagerConfiguration<L, C> configuration) {
Cache<Key<String>, ?> cache = this.configuration.getCache();
CacheProperties properties = new InfinispanCacheProperties(cache.getCacheConfiguration());
SessionsFactory<Map<D, S>, D, S> sessionsFactory = new CoarseSessionsFactory<>(this.configuration.getCache(), properties);
SSOFactory<Map.Entry<A, AtomicReference<L>>, Map<D, S>, A, D, S, L> factory = new InfinispanSSOFactory<>(this.configuration.getCache(), properties, new MarshalledValueMarshaller<>(configuration.getMarshalledValueFactory(), configuration.getMarshallingContext()), configuration.getLocalContextFactory(), sessionsFactory);
IdentifierFactory<String> idFactory = new AffinityIdentifierFactory<>(configuration.getIdentifierFactory(), cache, this.configuration.getKeyAffinityServiceFactory());
Batcher<TransactionBatch> batcher = new InfinispanBatcher(cache);
return new InfinispanSSOManager<>(factory, idFactory, batcher);
}
Aggregations