final public void memScaleDefinition(AttributesFactory afact) throws ParseException, StandardException { jj_consume_token(OFFHEAP); if (!ServerGroupUtils.isDataStore()) { afact.setEnableOffHeapMemory(false); } else { afact.setEnableOffHeapMemory(true); } }
final public void memScaleDefinition(AttributesFactory afact) throws ParseException, StandardException { jj_consume_token(OFFHEAP); if (!ServerGroupUtils.isDataStore()) { afact.setEnableOffHeapMemory(false); } else { afact.setEnableOffHeapMemory(true); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes<?, ?> createRegionAttrsForPR(int red, int localMaxMem, long recoveryDelay, EvictionAttributes evictionAttrs) { RegionAttributes<?, ?> attrs = super.createRegionAttrsForPR( red, localMaxMem, recoveryDelay, evictionAttrs); AttributesFactory factory = new AttributesFactory(attrs); factory.setEnableOffHeapMemory(true); return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setEnableOffHeapMemory(true); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setEnableOffHeapMemory(true); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setEnableOffHeapMemory(true); } return factory.create(); } }
public void run2() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).create()); factory.setEvictionAttributes(firstEa); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); assertEquals(firstEa, pr.getAttributes().getEvictionAttributes()); } };
public void createDistRegion() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(getOffHeapEnabled()); factory.setDataPolicy(DataPolicy.NORMAL); factory.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes( null, EvictionAction.LOCAL_DESTROY)); DistributedRegion distRegion = (DistributedRegion)cache.createRegion("DR1", factory.create()); assertNotNull(distRegion); }
public void run2() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).create()); factory.setEvictionAttributes(firstEvictionAttributes); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); assertEquals(firstEvictionAttributes, pr.getAttributes() .getEvictionAttributes()); } };
public void run2() { final PartitionAttributes pra = new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).setLocalMaxMemory(0).create(); AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(pra); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); } };
public void run2() { final PartitionAttributes pra = new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).setLocalMaxMemory(0).create(); AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(pra); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); } };
public void run2() { final PartitionAttributes pra = new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).setLocalMaxMemory(0).create(); AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(pra); factory.setEvictionAttributes(firstEvictionAttrs); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); } };
public void run2() { final PartitionAttributes pra = new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).setLocalMaxMemory(0).create(); AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(pra); factory.setEvictionAttributes(firstEvictionAttrs); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); } };
public void run2() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(false); factory.setPartitionAttributes(new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).create()); factory.setDiskSynchronous(true); factory.setCustomEvictionAttributes(criteria, start, interval); final PartitionedRegion pr = (PartitionedRegion)getCache().createRegionFactory(factory.create()).create(name); assertNotNull(pr); } };
public void run() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(isOffHeap()); factory.setPartitionAttributes(new PartitionAttributesFactory() .setRedundantCopies(redundantCopies).create()); final EvictionAttributes ea = EvictionAttributes.createLRUEntryAttributes(firstEvictionAttributes.getMaximum()+10, firstEvictionAttributes.getAction()); factory.setEvictionAttributes(ea); final Region pr = createRootRegion(name, factory.create()); assertNotNull(pr); } };