Search in sources :

Example 1 with StringPartitioningStrategy

use of com.hazelcast.partition.strategy.StringPartitioningStrategy 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);
}
Also used : PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) StringPartitioningStrategy(com.hazelcast.partition.strategy.StringPartitioningStrategy) StringPartitioningStrategy(com.hazelcast.partition.strategy.StringPartitioningStrategy) PartitioningStrategy(com.hazelcast.partition.PartitioningStrategy) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

PartitioningStrategyConfig (com.hazelcast.config.PartitioningStrategyConfig)1 PartitioningStrategy (com.hazelcast.partition.PartitioningStrategy)1 StringPartitioningStrategy (com.hazelcast.partition.strategy.StringPartitioningStrategy)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1