Examples of KeyAffinityServiceFactory


Examples of org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactory

        final boolean persistent = config.clustering().cacheMode().isClustered() || (evictionAllowed && !passivationEnabled);
        BeanFactory<G, I, T> beanFactory = new InfinispanBeanFactory<>(beanName, groupFactory, beanCache, this.context.getTimeout(), persistent ? passivationListener : null);
        Configuration<I, BeanKey<I>, BeanEntry<G>, BeanFactory<G, I, T>> beanConfiguration = new SimpleConfiguration<>(beanCache, beanFactory, beanIdentifierFactory);
        final NodeFactory<Address> nodeFactory = this.nodeFactory.getValue();
        final Registry<String, ?> registry = this.registry.getValue();
        final KeyAffinityServiceFactory affinityFactory = this.affinityFactory.getValue();
        final CommandDispatcherFactory dispatcherFactory = this.dispatcherFactory.getValue();
        final Time timeout = this.context.getTimeout();
        final ScheduledExecutorService scheduler = this.scheduler.getValue();
        final ExpirationConfiguration<T> expiration = new ExpirationConfiguration<T>() {
            @Override
View Full Code Here

Examples of org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactory

            @Override
            public G getKey() {
                return groupConfiguration.getIdentifierFactory().createIdentifier();
            }
        };
        KeyAffinityServiceFactory affinityFactory = configuration.getAffinityFactory();
        final KeyAffinityService<G> groupAffinity = affinityFactory.createService(this.groupCache, groupKeyGenerator);
        this.groupIdentifierFactory = new IdentifierFactory<G>() {
            @Override
            public G createIdentifier() {
                return groupAffinity.getKeyForAddress(address);
            }
        };
        this.affinityServices.add(groupAffinity);
        final KeyGenerator<BeanKey<I>> beanKeyGenerator = new KeyGenerator<BeanKey<I>>() {
            @Override
            public BeanKey<I> getKey() {
                return beanConfiguration.getFactory().createKey(beanConfiguration.getIdentifierFactory().createIdentifier());
            }
        };
        final KeyAffinityService<BeanKey<I>> beanAffinity = affinityFactory.createService(this.beanCache, beanKeyGenerator);
        this.beanIdentifierFactory = new IdentifierFactory<I>() {
            @Override
            public I createIdentifier() {
                return beanAffinity.getKeyForAddress(address).getId();
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.