Search in sources :

Example 41 with MapConfig

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

the class InvalidationMemberAddRemoveTest method createMapConfig.

protected MapConfig createMapConfig(String mapName) {
    MapConfig mapConfig = new MapConfig(mapName);
    mapConfig.setBackupCount(0);
    return mapConfig;
}
Also used : MapConfig(com.hazelcast.config.MapConfig)

Example 42 with MapConfig

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

the class MapInvalidationMetaDataMigrationTest method newConfig.

protected Config newConfig(String mapName) {
    NearCacheConfig nearCacheConfig = new NearCacheConfig();
    nearCacheConfig.setInMemoryFormat(getNearCacheInMemoryFormat());
    nearCacheConfig.setName(mapName);
    nearCacheConfig.setInvalidateOnChange(true);
    nearCacheConfig.setCacheLocalEntries(true);
    MapConfig mapConfig = new MapConfig(mapName);
    mapConfig.setNearCacheConfig(nearCacheConfig);
    mapConfig.setBackupCount(0).setAsyncBackupCount(0);
    Config config = getConfig();
    return config.addMapConfig(mapConfig);
}
Also used : MapConfig(com.hazelcast.config.MapConfig) Config(com.hazelcast.config.Config) NearCacheConfig(com.hazelcast.config.NearCacheConfig) NearCacheConfig(com.hazelcast.config.NearCacheConfig) MapConfig(com.hazelcast.config.MapConfig)

Example 43 with MapConfig

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

the class TransactionalMapWriteQuorumTest method initialize.

@BeforeClass
public static void initialize() throws Exception {
    QuorumConfig quorumConfig = new QuorumConfig();
    quorumConfig.setEnabled(true);
    quorumConfig.setSize(3);
    quorumConfig.setName(QUORUM_ID);
    quorumConfig.setType(QuorumType.WRITE);
    MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
    mapConfig.setQuorumName(QUORUM_ID);
    cluster = new PartitionedCluster(new TestHazelcastInstanceFactory()).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
}
Also used : QuorumConfig(com.hazelcast.config.QuorumConfig) PartitionedCluster(com.hazelcast.quorum.PartitionedCluster) MapConfig(com.hazelcast.config.MapConfig) TestHazelcastInstanceFactory(com.hazelcast.test.TestHazelcastInstanceFactory) BeforeClass(org.junit.BeforeClass)

Example 44 with MapConfig

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

the class TransactionalMapReadWriteQuorumTest method initialize.

@BeforeClass
public static void initialize() throws Exception {
    QuorumConfig quorumConfig = new QuorumConfig();
    quorumConfig.setEnabled(true);
    quorumConfig.setSize(3);
    quorumConfig.setName(QUORUM_ID);
    quorumConfig.setType(QuorumType.READ_WRITE);
    MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
    mapConfig.setQuorumName(QUORUM_ID);
    cluster = new PartitionedCluster(new TestHazelcastInstanceFactory()).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
}
Also used : QuorumConfig(com.hazelcast.config.QuorumConfig) PartitionedCluster(com.hazelcast.quorum.PartitionedCluster) MapConfig(com.hazelcast.config.MapConfig) TestHazelcastInstanceFactory(com.hazelcast.test.TestHazelcastInstanceFactory) BeforeClass(org.junit.BeforeClass)

Example 45 with MapConfig

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

the class ConfigValidatorTest method checkMapConfig_withIgnoredConfigMinEvictionCheckMillis.

@Test
@SuppressWarnings("deprecation")
public void checkMapConfig_withIgnoredConfigMinEvictionCheckMillis() {
    MapConfig mapConfig = getMapConfig(BINARY).setMinEvictionCheckMillis(100);
    checkMapConfig(mapConfig);
}
Also used : ConfigValidator.checkMapConfig(com.hazelcast.internal.config.ConfigValidator.checkMapConfig) MapConfig(com.hazelcast.config.MapConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

MapConfig (com.hazelcast.config.MapConfig)178 Config (com.hazelcast.config.Config)123 HazelcastInstance (com.hazelcast.core.HazelcastInstance)78 Test (org.junit.Test)75 QuickTest (com.hazelcast.test.annotation.QuickTest)68 ParallelTest (com.hazelcast.test.annotation.ParallelTest)62 MapStoreConfig (com.hazelcast.config.MapStoreConfig)43 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)41 NearCacheConfig (com.hazelcast.config.NearCacheConfig)27 MaxSizeConfig (com.hazelcast.config.MaxSizeConfig)26 MapIndexConfig (com.hazelcast.config.MapIndexConfig)20 QuorumConfig (com.hazelcast.config.QuorumConfig)19 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)18 QueryCacheConfig (com.hazelcast.config.QueryCacheConfig)16 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)14 NightlyTest (com.hazelcast.test.annotation.NightlyTest)12 PartitionedCluster (com.hazelcast.quorum.PartitionedCluster)10 CountDownLatch (java.util.concurrent.CountDownLatch)10 BeforeClass (org.junit.BeforeClass)10 AssertTask (com.hazelcast.test.AssertTask)9