use of org.apache.geode.internal.cache.xmlcache.ClientCacheCreation in project geode by apache.
the class CacheXml66DUnitTest method testClientLOCAL_PERSISTENT.
@Test
public void testClientLOCAL_PERSISTENT() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("cplocal", "LOCAL_PERSISTENT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("cplocal");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PERSISTENT_REPLICATE, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals(null, ra.getPoolName());
}
use of org.apache.geode.internal.cache.xmlcache.ClientCacheCreation in project geode by apache.
the class CacheXml66DUnitTest method testClientLOCAL.
@Test
public void testClientLOCAL() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("local", "LOCAL");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("local");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.NORMAL, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals(null, ra.getPoolName());
}
use of org.apache.geode.internal.cache.xmlcache.ClientCacheCreation in project geode by apache.
the class CacheXml66DUnitTest method testClientLOCAL_OVERFLOW.
@Test
public void testClientLOCAL_OVERFLOW() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("localoverflow", "LOCAL_OVERFLOW");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("localoverflow");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.NORMAL, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals(null, ra.getPoolName());
assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes());
assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage(), 0);
}
use of org.apache.geode.internal.cache.xmlcache.ClientCacheCreation in project geode by apache.
the class CacheXml66DUnitTest method testClientLOCAL_PERSISTENT_OVERFLOW.
@Test
public void testClientLOCAL_PERSISTENT_OVERFLOW() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("cpolocal", "LOCAL_PERSISTENT_OVERFLOW");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("cpolocal");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PERSISTENT_REPLICATE, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals(null, ra.getPoolName());
assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes());
assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage(), 0);
}
use of org.apache.geode.internal.cache.xmlcache.ClientCacheCreation in project geode by apache.
the class CacheXml66DUnitTest method testCACHING_PROXY.
@Test
public void testCACHING_PROXY() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("cproxy", "CACHING_PROXY");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("cproxy");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.NORMAL, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals("DEFAULT", ra.getPoolName());
}
Aggregations