use of com.hazelcast.config.PartitioningStrategyConfig in project hazelcast by hazelcast.
the class PartitioningStrategyFactoryTest method whenPartitioningStrategyDefined_getPartitioningStrategy_returnsSameInstance.
@Test
public void whenPartitioningStrategyDefined_getPartitioningStrategy_returnsSameInstance() {
PartitioningStrategy configuredPartitioningStrategy = new StringPartitioningStrategy();
PartitioningStrategyConfig cfg = new PartitioningStrategyConfig(configuredPartitioningStrategy);
PartitioningStrategy partitioningStrategy = partitioningStrategyFactory.getPartitioningStrategy(mapName, cfg);
assertSame(configuredPartitioningStrategy, partitioningStrategy);
}
use of com.hazelcast.config.PartitioningStrategyConfig in project hazelcast by hazelcast.
the class PartitionControlledIdTest method startHazelcastInstances.
@BeforeClass
public static void startHazelcastInstances() throws Exception {
Config config = new Config();
PartitioningStrategy partitioningStrategy = StringAndPartitionAwarePartitioningStrategy.INSTANCE;
config.getMapConfig("default").setPartitioningStrategyConfig(new PartitioningStrategyConfig(partitioningStrategy));
TestHazelcastInstanceFactory instanceFactory = new TestHazelcastInstanceFactory(4);
instances = instanceFactory.newInstances(config);
warmUpPartitions(instances);
}
Aggregations