Search in sources :

Example 11 with PartitioningStrategy

use of com.hazelcast.partition.PartitioningStrategy 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

PartitioningStrategy (com.hazelcast.partition.PartitioningStrategy)11 QuickTest (com.hazelcast.test.annotation.QuickTest)6 Test (org.junit.Test)6 StringPartitioningStrategy (com.hazelcast.partition.strategy.StringPartitioningStrategy)5 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)5 PartitioningStrategyConfig (com.hazelcast.config.PartitioningStrategyConfig)4 Data (com.hazelcast.internal.serialization.Data)3 SerializationConfig (com.hazelcast.config.SerializationConfig)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 SerializationService (com.hazelcast.internal.serialization.SerializationService)2 SerializationServiceBuilder (com.hazelcast.internal.serialization.SerializationServiceBuilder)2 DefaultSerializationServiceBuilder (com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder)2 DefaultPartitioningStrategy (com.hazelcast.partition.strategy.DefaultPartitioningStrategy)2 HazelcastClientNotActiveException (com.hazelcast.client.HazelcastClientNotActiveException)1 ClientConfig (com.hazelcast.client.config.ClientConfig)1 ClientMapProxy (com.hazelcast.client.impl.proxy.ClientMapProxy)1 AuditlogConfig (com.hazelcast.config.AuditlogConfig)1 Config (com.hazelcast.config.Config)1 ConfigAccessor.getActiveMemberNetworkConfig (com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig)1 InstanceTrackingConfig (com.hazelcast.config.InstanceTrackingConfig)1