Search in sources :

Example 1 with NearCacheConfig

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

the class InvalidationMemberAddRemoveTest method createNearCacheConfig.

protected NearCacheConfig createNearCacheConfig(String mapName) {
    NearCacheConfig nearCacheConfig = newNearCacheConfig();
    nearCacheConfig.setInvalidateOnChange(true);
    nearCacheConfig.setName(mapName);
    nearCacheConfig.getEvictionConfig().setSize(Integer.MAX_VALUE).setEvictionPolicy(EvictionPolicy.NONE);
    return nearCacheConfig;
}
Also used : NearCacheConfig(com.hazelcast.config.NearCacheConfig)

Example 2 with NearCacheConfig

use of com.hazelcast.config.NearCacheConfig 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 3 with NearCacheConfig

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

the class MemberMapRecordStateStressTest method newNearCacheConfig.

protected NearCacheConfig newNearCacheConfig() {
    NearCacheConfig nearCacheConfig = new NearCacheConfig();
    nearCacheConfig.setName(mapName);
    nearCacheConfig.setInvalidateOnChange(true);
    return nearCacheConfig;
}
Also used : NearCacheConfig(com.hazelcast.config.NearCacheConfig)

Example 4 with NearCacheConfig

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

the class NearCacheLiteMemberTest method createConfig.

public static Config createConfig(String mapName, boolean liteMember) {
    NearCacheConfig nearCacheConfig = new NearCacheConfig();
    nearCacheConfig.setInvalidateOnChange(true);
    Config config = new Config();
    config.setLiteMember(liteMember);
    config.getMapConfig(mapName).setNearCacheConfig(nearCacheConfig);
    return config;
}
Also used : Config(com.hazelcast.config.Config) NearCacheConfig(com.hazelcast.config.NearCacheConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig) NearCacheConfig(com.hazelcast.config.NearCacheConfig)

Example 5 with NearCacheConfig

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

the class NearCacheStaleReadTest method getNearCacheConfig.

protected NearCacheConfig getNearCacheConfig() {
    NearCacheConfig nearCacheConfig = new NearCacheConfig();
    // this enables caching of local entries
    nearCacheConfig.setCacheLocalEntries(true);
    nearCacheConfig.setInMemoryFormat(OBJECT);
    return nearCacheConfig;
}
Also used : NearCacheConfig(com.hazelcast.config.NearCacheConfig)

Aggregations

NearCacheConfig (com.hazelcast.config.NearCacheConfig)212 Test (org.junit.Test)89 QuickTest (com.hazelcast.test.annotation.QuickTest)82 Config (com.hazelcast.config.Config)66 HazelcastInstance (com.hazelcast.core.HazelcastInstance)65 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)62 ClientConfig (com.hazelcast.client.config.ClientConfig)51 MapConfig (com.hazelcast.config.MapConfig)37 EvictionConfig (com.hazelcast.config.EvictionConfig)24 Before (org.junit.Before)17 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)16 CacheConfig (com.hazelcast.config.CacheConfig)15 ParallelTest (com.hazelcast.test.annotation.ParallelTest)15 NearCacheTestUtils.getBaseConfig (com.hazelcast.internal.nearcache.impl.NearCacheTestUtils.getBaseConfig)14 AssertTask (com.hazelcast.test.AssertTask)14 NightlyTest (com.hazelcast.test.annotation.NightlyTest)12 MapStoreConfig (com.hazelcast.config.MapStoreConfig)11 Data (com.hazelcast.nio.serialization.Data)11 MatchingPointConfigPatternMatcher (com.hazelcast.config.matcher.MatchingPointConfigPatternMatcher)10 CachingProvider (javax.cache.spi.CachingProvider)10