Search in sources :

Example 1 with CoarseSessionsFactory

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);
}
Also used : CoarseSessionsFactory(org.wildfly.clustering.web.infinispan.sso.coarse.CoarseSessionsFactory) TransactionBatch(org.wildfly.clustering.ee.infinispan.TransactionBatch) InfinispanBatcher(org.wildfly.clustering.ee.infinispan.InfinispanBatcher) InfinispanCacheProperties(org.wildfly.clustering.ee.infinispan.InfinispanCacheProperties) CacheProperties(org.wildfly.clustering.ee.infinispan.CacheProperties) AffinityIdentifierFactory(org.wildfly.clustering.web.infinispan.AffinityIdentifierFactory) Map(java.util.Map) Key(org.wildfly.clustering.infinispan.spi.distribution.Key) InfinispanCacheProperties(org.wildfly.clustering.ee.infinispan.InfinispanCacheProperties)

Aggregations

Map (java.util.Map)1 CacheProperties (org.wildfly.clustering.ee.infinispan.CacheProperties)1 InfinispanBatcher (org.wildfly.clustering.ee.infinispan.InfinispanBatcher)1 InfinispanCacheProperties (org.wildfly.clustering.ee.infinispan.InfinispanCacheProperties)1 TransactionBatch (org.wildfly.clustering.ee.infinispan.TransactionBatch)1 Key (org.wildfly.clustering.infinispan.spi.distribution.Key)1 AffinityIdentifierFactory (org.wildfly.clustering.web.infinispan.AffinityIdentifierFactory)1 CoarseSessionsFactory (org.wildfly.clustering.web.infinispan.sso.coarse.CoarseSessionsFactory)1