Search in sources :

Example 1 with GroupingPartitioner

use of org.infinispan.distribution.group.impl.GroupingPartitioner in project wildfly by wildfly.

the class KeyPartitionerFactory method construct.

@Override
public Object construct(String componentName) {
    if (!this.configuration.clustering().cacheMode().isClustered() && !this.configuration.persistence().usingSegmentedStore()) {
        return SingleSegmentKeyPartitioner.getInstance();
    }
    HashConfiguration hashConfiguration = this.configuration.clustering().hash();
    KeyPartitioner partitioner = hashConfiguration.keyPartitioner();
    partitioner.init(hashConfiguration);
    this.basicComponentRegistry.wireDependencies(partitioner, false);
    return (this.groupManager != null) ? new GroupingPartitioner(partitioner, this.groupManager) : partitioner;
}
Also used : HashConfiguration(org.infinispan.configuration.cache.HashConfiguration) KeyPartitioner(org.infinispan.distribution.ch.KeyPartitioner) SingleSegmentKeyPartitioner(org.infinispan.distribution.ch.impl.SingleSegmentKeyPartitioner) GroupingPartitioner(org.infinispan.distribution.group.impl.GroupingPartitioner)

Aggregations

HashConfiguration (org.infinispan.configuration.cache.HashConfiguration)1 KeyPartitioner (org.infinispan.distribution.ch.KeyPartitioner)1 SingleSegmentKeyPartitioner (org.infinispan.distribution.ch.impl.SingleSegmentKeyPartitioner)1 GroupingPartitioner (org.infinispan.distribution.group.impl.GroupingPartitioner)1