/** * Creates a RegionMap that is stored in the VM. * @param owner the region that will be the owner of the map * @param attrs attributes used to create the map and its entries */ public static RegionMap createVM(LocalRegion owner, RegionMap.Attributes attrs,InternalRegionArguments internalRegionArgs) { //final boolean isNotPartitionedRegion = !(owner.getPartitionAttributes() != null || owner //.getDataPolicy().withPartitioning()); if (owner.isProxy() /*|| owner instanceof PartitionedRegion*/) { // TODO enabling this causes eviction tests to fail return new ProxyRegionMap(owner, attrs, internalRegionArgs); } else if (internalRegionArgs.isReadWriteHDFSRegion()) { if (owner.getEvictionController() == null) { return new HDFSRegionMapImpl(owner, attrs, internalRegionArgs); } return new HDFSLRURegionMap(owner, attrs, internalRegionArgs); //else if (owner.getEvictionController() != null && isNotPartitionedRegion) { } else if (owner.getEvictionController() != null ) { return new VMLRURegionMap(owner, attrs,internalRegionArgs); } else { return new VMRegionMap(owner, attrs, internalRegionArgs); } }
/** * Creates a RegionMap that is stored in the VM. * @param owner the region that will be the owner of the map * @param attrs attributes used to create the map and its entries */ public static RegionMap createVM(LocalRegion owner, RegionMap.Attributes attrs,InternalRegionArguments internalRegionArgs) { //final boolean isNotPartitionedRegion = !(owner.getPartitionAttributes() != null || owner //.getDataPolicy().withPartitioning()); if (owner.isProxy() /*|| owner instanceof PartitionedRegion*/) { // TODO enabling this causes eviction tests to fail return new ProxyRegionMap(owner, attrs, internalRegionArgs); } else if (internalRegionArgs.isReadWriteHDFSRegion()) { if (owner.getEvictionController() == null) { return new HDFSRegionMapImpl(owner, attrs, internalRegionArgs); } return new HDFSLRURegionMap(owner, attrs, internalRegionArgs); //else if (owner.getEvictionController() != null && isNotPartitionedRegion) { } else if (owner.getEvictionController() != null ) { return new VMLRURegionMap(owner, attrs,internalRegionArgs); } else { return new VMRegionMap(owner, attrs, internalRegionArgs); } }