public void run2() throws CacheException { final Cache cache; try { CacheXml30Test.lonerDistributedSystem = false; cache = getCache(); } finally { CacheXml30Test.lonerDistributedSystem = true; } Region region = cache.getRegion(regionName); assertNotNull(region); RegionAttributes attrs = region.getAttributes(); assertNotNull(attrs.getPartitionAttributes()); PartitionAttributes pa = attrs.getPartitionAttributes(); // assertNull(pa.getCacheWriter()); assertEquals(pa.getRedundantCopies(), 1); assertEquals(pa.getGlobalProperties().getProperty( PartitionAttributesFactory.GLOBAL_MAX_MEMORY_PROPERTY), "96"); assertEquals(pa.getLocalProperties().getProperty( PartitionAttributesFactory.LOCAL_MAX_MEMORY_PROPERTY), "32"); } };
aStr.append(" localProperties: " + parAttr.getLocalProperties() + "\n"); aStr.append(" globalProperties: " + parAttr.getGlobalProperties() + "\n"); aStr.append(" partitonResolver: " + parAttr.getPartitionResolver()+ "\n");
Properties p = pa.getLocalProperties(); generate(p, LOCAL_PROPERTIES);
Properties p = pa.getLocalProperties(); generate(p, LOCAL_PROPERTIES);
@SuppressWarnings("unchecked") public void setAll(@SuppressWarnings("rawtypes") PartitionAttributes pa) { setRedundantCopies(pa.getRedundantCopies()); setLocalProperties(pa.getLocalProperties()); setGlobalProperties(pa.getGlobalProperties()); setLocalMaxMemory(pa.getLocalMaxMemory()); setTotalMaxMemory(pa.getTotalMaxMemory()); setTotalNumBuckets(pa.getTotalNumBuckets()); setPartitionResolver(pa.getPartitionResolver()); setColocatedWith(pa.getColocatedWith()); setRecoveryDelay(pa.getRecoveryDelay()); setStartupRecoveryDelay(pa.getStartupRecoveryDelay()); setOffHeap(((PartitionAttributesImpl) pa).getOffHeap()); addFixedPartitionAttributes(pa.getFixedPartitionAttributes()); }
@SuppressWarnings("unchecked") public void setAll(@SuppressWarnings("rawtypes") PartitionAttributes pa) { setRedundantCopies(pa.getRedundantCopies()); setLocalProperties(pa.getLocalProperties()); setGlobalProperties(pa.getGlobalProperties()); setLocalMaxMemory(pa.getLocalMaxMemory()); setTotalMaxMemory(pa.getTotalMaxMemory()); setTotalNumBuckets(pa.getTotalNumBuckets()); setPartitionResolver(pa.getPartitionResolver()); setColocatedWith(pa.getColocatedWith()); setRecoveryDelay(pa.getRecoveryDelay()); setStartupRecoveryDelay(pa.getStartupRecoveryDelay()); setEnableOffHeapMemory(((PartitionAttributesImpl) pa).getEnableOffHeapMemory()); addFixedPartitionAttributes(pa.getFixedPartitionAttributes()); }