Search in sources :

Example 11 with PartitioningStrategyConfig

use of com.hazelcast.config.PartitioningStrategyConfig in project hazelcast by hazelcast.

the class PartitionControlledIdTest method startHazelcastInstances.

@BeforeClass
public static void startHazelcastInstances() {
    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);
}
Also used : PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) Config(com.hazelcast.config.Config) StringAndPartitionAwarePartitioningStrategy(com.hazelcast.partition.strategy.StringAndPartitionAwarePartitioningStrategy) TestHazelcastInstanceFactory(com.hazelcast.test.TestHazelcastInstanceFactory) BeforeClass(org.junit.BeforeClass)

Aggregations

PartitioningStrategyConfig (com.hazelcast.config.PartitioningStrategyConfig)11 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)5 QuickTest (com.hazelcast.test.annotation.QuickTest)5 Test (org.junit.Test)5 MapConfig (com.hazelcast.config.MapConfig)4 PartitioningStrategy (com.hazelcast.partition.PartitioningStrategy)4 StringPartitioningStrategy (com.hazelcast.partition.strategy.StringPartitioningStrategy)4 AttributeConfig (com.hazelcast.config.AttributeConfig)3 Config (com.hazelcast.config.Config)3 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)3 EvictionConfig (com.hazelcast.config.EvictionConfig)3 IndexConfig (com.hazelcast.config.IndexConfig)3 MapPartitionLostListenerConfig (com.hazelcast.config.MapPartitionLostListenerConfig)3 MapStoreConfig (com.hazelcast.config.MapStoreConfig)3 NearCacheConfig (com.hazelcast.config.NearCacheConfig)3 QueryCacheConfig (com.hazelcast.config.QueryCacheConfig)3 AwsConfig (com.hazelcast.config.AwsConfig)2 CachePartitionLostListenerConfig (com.hazelcast.config.CachePartitionLostListenerConfig)2 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)2 CacheSimpleEntryListenerConfig (com.hazelcast.config.CacheSimpleEntryListenerConfig)2