Search in sources :

Example 1 with HashConfigurationBuilder

use of org.infinispan.configuration.cache.HashConfigurationBuilder in project wildfly by wildfly.

the class DistributedCacheBuilder method accept.

@Override
public void accept(ConfigurationBuilder builder) {
    super.accept(builder);
    HashConfigurationBuilder hash = builder.clustering().l1().read(this.l1).hash().read(this.hash);
    // ConsistentHashStrategy.INTER_CACHE is Infinispan's default behavior
    if (this.consistentHashStrategy == ConsistentHashStrategy.INTRA_CACHE) {
        hash.consistentHashFactory(this.global.getValue().transport().hasTopologyInfo() ? new TopologyAwareConsistentHashFactory() : new DefaultConsistentHashFactory());
    }
}
Also used : TopologyAwareConsistentHashFactory(org.infinispan.distribution.ch.impl.TopologyAwareConsistentHashFactory) HashConfigurationBuilder(org.infinispan.configuration.cache.HashConfigurationBuilder) DefaultConsistentHashFactory(org.infinispan.distribution.ch.impl.DefaultConsistentHashFactory)

Aggregations

HashConfigurationBuilder (org.infinispan.configuration.cache.HashConfigurationBuilder)1 DefaultConsistentHashFactory (org.infinispan.distribution.ch.impl.DefaultConsistentHashFactory)1 TopologyAwareConsistentHashFactory (org.infinispan.distribution.ch.impl.TopologyAwareConsistentHashFactory)1