public void testPARTITION_REDUNDANT() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } } public void testPARTITION_PERSISTENT() throws CacheException, IOException
public void testPARTITION() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } } public void testPARTITION_REDUNDANT() throws CacheException, IOException
public void testPARTITION_PERSISTENT() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_PERSISTENT); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PERSISTENT_PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } } public void testPARTITION_REDUNDANT_PERSISTENT() throws CacheException, IOException
public void testPARTITION_REDUNDANT_PERSISTENT() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT_PERSISTENT); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PERSISTENT_PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } } public void testPARTITION_OVERFLOW() throws CacheException, IOException
public void testPARTITION_PROXY() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_PROXY); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(0, ra.getPartitionAttributes().getLocalMaxMemory()); } finally { cleanUpRegion(r1); } } public void testPARTITION_PROXY_REDUNDANT() throws CacheException, IOException
public void testPARTITION_PROXY_REDUNDANT() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_PROXY_REDUNDANT); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(0, ra.getPartitionAttributes().getLocalMaxMemory()); } finally { cleanUpRegion(r1); } } public void testREPLICATE_PROXY() throws CacheException, IOException
public void testBug45749part2() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT); factory.setPartitionAttributes(new PartitionAttributesFactory().setTotalNumBuckets(5).setRedundantCopies(2).create()); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(5, ra.getPartitionAttributes().getTotalNumBuckets()); assertEquals(2, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } }
public void testPARTITION_REDUNDANT_OVERFLOW() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT_OVERFLOW); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes()); assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage()); } finally { cleanUpRegion(r1); } } public void testPARTITION_PERSISTENT_OVERFLOW() throws CacheException, IOException
public void testBug45749() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT); factory.setPartitionAttributes(new PartitionAttributesFactory().setTotalNumBuckets(5).create()); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(5, ra.getPartitionAttributes().getTotalNumBuckets()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); } finally { cleanUpRegion(r1); } } public void testBug45749part2() throws CacheException, IOException
public void testPARTITION_HEAP_LRU() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_HEAP_LRU); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(EvictionAttributes.createLRUHeapAttributes(), ra.getEvictionAttributes()); assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage()); } finally { cleanUpRegion(r1); } } public void testPARTITION_REDUNDANT_HEAP_LRU() throws CacheException, IOException
public void testPARTITION_OVERFLOW() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_OVERFLOW); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes()); assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage()); } finally { cleanUpRegion(r1); } } public void testPARTITION_REDUNDANT_OVERFLOW() throws CacheException, IOException
public void testPARTITION_PERSISTENT_OVERFLOW() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_PERSISTENT_OVERFLOW); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PERSISTENT_PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(0, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes()); assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage()); } finally { cleanUpRegion(r1); } } public void testPARTITION_REDUNDANT_PERSISTENT_OVERFLOW() throws CacheException, IOException
public void testPARTITION_REDUNDANT_PERSISTENT_OVERFLOW() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT_PERSISTENT_OVERFLOW); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(DataPolicy.PERSISTENT_PARTITION, ra.getDataPolicy()); assertNotNull(ra.getPartitionAttributes()); assertEquals(1, ra.getPartitionAttributes().getRedundantCopies()); assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes()); assertEquals(LocalRegion.DEFAULT_HEAPLRU_EVICTION_HEAP_PERCENTAGE, c.getResourceManager().getEvictionHeapPercentage()); } finally { cleanUpRegion(r1); } } public void testPARTITION_HEAP_LRU() throws CacheException, IOException
public void testPARTITION_REDUNDANT_HEAP_LRU() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(PARTITION_REDUNDANT_HEAP_LRU); r1 = factory.create(this.r1Name); RegionAttributes ra = r1.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()); } finally { cleanUpRegion(r1); } } public void testREPLICATE() throws CacheException, IOException