use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testDefaultCacheConfig.
@Test
public void testDefaultCacheConfig() {
CacheSimpleConfig config = new CacheSimpleConfig().setName(name);
driver.getConfig().addCacheConfig(config);
assertConfigurationsEqualOnAllMembers(config);
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TimedMemberStateTest method setUp.
@Before
public void setUp() {
Config config = smallInstanceConfig();
config.addCacheConfig(new CacheSimpleConfig().setName(CACHE_WITH_STATS_PREFIX + "*").setStatisticsEnabled(true));
config.addCacheConfig(new CacheSimpleConfig().setName(CACHE_WITHOUT_STATS_PREFIX + "*"));
hz = createHazelcastInstance(config);
timedMemberStateFactory = new TimedMemberStateFactory(getHazelcastInstanceImpl(hz));
timedMemberState = createState();
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TestInClusterSupport method prepareConfig.
protected static Config prepareConfig() {
parallelism = Runtime.getRuntime().availableProcessors() / MEMBER_COUNT / 2;
Config config = smallInstanceConfig();
JetConfig jetConfig = config.getJetConfig().setResourceUploadEnabled(true);
jetConfig.setCooperativeThreadCount(max(2, parallelism));
config.getMetricsConfig().setCollectionFrequencySeconds(1);
// Set partition count to match the parallelism of IMap sources.
// Their preferred local parallelism is 2, therefore partition count
// should be 2 * MEMBER_COUNT.
config.setProperty(ClusterProperty.PARTITION_COUNT.getName(), "" + 2 * MEMBER_COUNT);
config.addCacheConfig(new CacheSimpleConfig().setName("*"));
config.getMapConfig(JOURNALED_MAP_PREFIX + '*').getEventJournalConfig().setEnabled(true);
config.getCacheConfig(JOURNALED_CACHE_PREFIX + '*').getEventJournalConfig().setEnabled(true);
return config;
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class PhoneHomeTest method testCacheWithWANReplication.
@Test
public void testCacheWithWANReplication() {
Map<String, String> parameters;
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.CACHE_COUNT_WITH_WAN_REPLICATION.getRequestParameterName()), "0");
CachingProvider cachingProvider = createServerCachingProvider(node.hazelcastInstance);
CacheManager cacheManager = cachingProvider.getCacheManager();
CacheSimpleConfig cacheSimpleConfig = new CacheSimpleConfig();
cacheSimpleConfig.setName("hazelcast");
cacheSimpleConfig.setWanReplicationRef(new WanReplicationRef());
cacheManager.createCache("hazelcast", new CacheConfig<>("hazelcast"));
node.getConfig().addCacheConfig(cacheSimpleConfig);
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.CACHE_COUNT_WITH_WAN_REPLICATION.getRequestParameterName()), "1");
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class GetCacheEntryRequestTest method onSetup.
@Override
protected void onSetup() {
Config config = new Config();
config.addCacheConfig(new CacheSimpleConfig().setName("test"));
config.getCacheConfig("test").setStatisticsEnabled(true);
hz = createHazelcastInstance(config);
managementCenterService = getNode(hz).getManagementCenterService();
}
Aggregations