use of org.apache.geode.internal.cache.xmlcache.RegionCreation in project geode by apache.
the class CacheXml66DUnitTest method testREPLICATE_PROXY.
@Test
public void testREPLICATE_PROXY() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("replicateProxy", "REPLICATE_PROXY");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("replicateProxy");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.EMPTY, ra.getDataPolicy());
assertEquals(Scope.DISTRIBUTED_ACK, ra.getScope());
}
use of org.apache.geode.internal.cache.xmlcache.RegionCreation in project geode by apache.
the class CacheXml66DUnitTest method testPARTITION.
@Test
public void testPARTITION() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("partition", "PARTITION");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("partition");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PARTITION, ra.getDataPolicy());
assertNotNull(ra.getPartitionAttributes());
assertEquals(0, ra.getPartitionAttributes().getRedundantCopies());
}
use of org.apache.geode.internal.cache.xmlcache.RegionCreation in project geode by apache.
the class CacheXml66DUnitTest method testREPLICATE.
@Test
public void testREPLICATE() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("replicate", "REPLICATE");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("replicate");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.REPLICATE, ra.getDataPolicy());
assertEquals(Scope.DISTRIBUTED_ACK, ra.getScope());
}
use of org.apache.geode.internal.cache.xmlcache.RegionCreation in project geode by apache.
the class CacheXml66DUnitTest method testPARTITION_REDUNDANT_HEAP_LRU.
@Test
public void testPARTITION_REDUNDANT_HEAP_LRU() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("rpartitionlru", "PARTITION_REDUNDANT_HEAP_LRU");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("rpartitionlru");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PARTITION, ra.getDataPolicy());
assertNotNull(ra.getPartitionAttributes());
assertEquals(1, ra.getPartitionAttributes().getRedundantCopies());
assertEquals(EvictionAttributes.createLRUHeapAttributes(), ra.getEvictionAttributes());
assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage(), 0);
}
use of org.apache.geode.internal.cache.xmlcache.RegionCreation in project geode by apache.
the class CacheXml66DUnitTest method testPARTITION_REDUNDANT.
@Test
public void testPARTITION_REDUNDANT() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("rpartition", "PARTITION_REDUNDANT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("rpartition");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PARTITION, ra.getDataPolicy());
assertNotNull(ra.getPartitionAttributes());
assertEquals(1, ra.getPartitionAttributes().getRedundantCopies());
}
Aggregations