use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TestJCache method cacheConfigXmlTest_DefaultMergePolicy.
@Test
public void cacheConfigXmlTest_DefaultMergePolicy() {
assertNotNull(instance1);
CacheSimpleConfig cacheWithDefaultMergePolicyConfig = instance1.getConfig().getCacheConfig("cacheWithDefaultMergePolicy");
assertNotNull(cacheWithDefaultMergePolicyConfig);
assertEquals(MergePolicyConfig.DEFAULT_MERGE_POLICY, cacheWithDefaultMergePolicyConfig.getMergePolicyConfig().getPolicy());
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TestJCache method cacheConfigXmlTest_PartitionLostListener.
@Test
public void cacheConfigXmlTest_PartitionLostListener() {
Config config = instance1.getConfig();
CacheSimpleConfig cacheWithPartitionLostListenerConfig = config.getCacheConfig("cacheWithPartitionLostListener");
List<CachePartitionLostListenerConfig> partitionLostListenerConfigs = cacheWithPartitionLostListenerConfig.getPartitionLostListenerConfigs();
assertNotNull(partitionLostListenerConfigs);
assertEquals(1, partitionLostListenerConfigs.size());
assertEquals(partitionLostListenerConfigs.get(0).getClassName(), "DummyCachePartitionLostListenerImpl");
assertNotNull(partitionLostListenerConfigs);
assertEquals(1, partitionLostListenerConfigs.size());
assertEquals(partitionLostListenerConfigs.get(0).getClassName(), "DummyCachePartitionLostListenerImpl");
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TestJCache method cacheConfigXmlTest_TimedCreatedExpiryPolicyFactory.
@Test
public void cacheConfigXmlTest_TimedCreatedExpiryPolicyFactory() {
Config config = instance1.getConfig();
CacheSimpleConfig cacheWithTimedCreatedExpiryPolicyFactoryConfig = config.getCacheConfig("cacheWithTimedCreatedExpiryPolicyFactory");
ExpiryPolicyFactoryConfig expiryPolicyFactoryConfig = cacheWithTimedCreatedExpiryPolicyFactoryConfig.getExpiryPolicyFactoryConfig();
ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig timedExpiryPolicyFactoryConfig = expiryPolicyFactoryConfig.getTimedExpiryPolicyFactoryConfig();
DurationConfig durationConfig = timedExpiryPolicyFactoryConfig.getDurationConfig();
assertNotNull(expiryPolicyFactoryConfig);
assertNotNull(timedExpiryPolicyFactoryConfig);
assertNotNull(durationConfig);
assertNull(expiryPolicyFactoryConfig.getClassName());
assertEquals(ExpiryPolicyType.CREATED, timedExpiryPolicyFactoryConfig.getExpiryPolicyType());
assertEquals(1, durationConfig.getDurationAmount());
assertEquals(TimeUnit.DAYS, durationConfig.getTimeUnit());
}
use of com.hazelcast.config.CacheSimpleConfig in project hazelcast by hazelcast.
the class TestJCache method cacheConfigXmlTest_SimpleWriterLoader.
@Test
public void cacheConfigXmlTest_SimpleWriterLoader() {
assertNotNull(instance1);
CacheSimpleConfig config = instance1.getConfig().getCacheConfig("cacheWithSimpleWriterAndLoader");
assertNotNull(config);
assertEquals("com.hazelcast.config.CacheConfigTest$EmptyCacheWriter", config.getCacheWriter());
assertEquals("com.hazelcast.config.CacheConfigTest$MyCacheLoader", config.getCacheLoader());
}
Aggregations