use of org.apache.geode.cache.EvictionAttributes in project geode by apache.
the class MemberCommandsDUnitTest method createPartitionedRegion.
private void createPartitionedRegion(String regionName) {
final Cache cache = getCache();
// Create the data region
RegionFactory<String, Integer> dataRegionFactory = cache.createRegionFactory(RegionShortcut.PARTITION);
dataRegionFactory.setConcurrencyLevel(4);
EvictionAttributes ea = EvictionAttributes.createLIFOEntryAttributes(100, EvictionAction.LOCAL_DESTROY);
dataRegionFactory.setEvictionAttributes(ea);
dataRegionFactory.setEnableAsyncConflation(true);
FixedPartitionAttributes fpa = FixedPartitionAttributes.createFixedPartition("Par1", true);
PartitionAttributes pa = new PartitionAttributesFactory().setLocalMaxMemory(100).setRecoveryDelay(2).setTotalMaxMemory(200).setRedundantCopies(1).addFixedPartitionAttributes(fpa).create();
dataRegionFactory.setPartitionAttributes(pa);
dataRegionFactory.create(regionName);
}
Aggregations