/** * Returns true if table is partitioned. */ public final boolean isPartitioned() { return this.regionAttributes.getDataPolicy().withPartitioning(); }
public Set<Region<?, ?>> rootRegions() { preOp(); Set<Region<?, ?>> rRegions = new HashSet<Region<?,?>>(); Iterator<LocalRegion> it = this.cache.rootRegions().iterator(); while (it.hasNext()) { LocalRegion lr = it.next(); if (!lr.getAttributes().getDataPolicy().withStorage()) { rRegions.add(new ProxyRegion(this, lr)); } } return Collections.unmodifiableSet(rRegions); }
public <K, V> Set<Integer> getLocalBucketSet(Region<K, V> region) { if (!region.getAttributes().getDataPolicy().withPartitioning()) { return null; } return this.localBucketSet; } }
public Set<Region<?, ?>> rootRegions() { preOp(); Set<Region<?, ?>> rRegions = new HashSet<Region<?,?>>(); Iterator<LocalRegion> it = this.cache.rootRegions().iterator(); while (it.hasNext()) { LocalRegion lr = it.next(); if (!lr.getAttributes().getDataPolicy().withStorage()) { rRegions.add(new ProxyRegion(this, lr)); } } return Collections.unmodifiableSet(rRegions); }
private boolean shouldRunInParallel(SnapshotOptions<K, V> options) { return ((SnapshotOptionsImpl<K, V>) options).isParallelMode() && region.getAttributes().getDataPolicy().withPartitioning() && !(region instanceof LocalDataSet); }
/** * Returns true if the underlying region is partitioned and has redundancy. * * @return true if region is partitioned and redundant. */ public final boolean isRedundant() { if (this.regionAttributes.getDataPolicy().withPartitioning()) { return this.regionAttributes.getPartitionAttributes() .getRedundantCopies() > 0; } return false; }
/** * Returns true if the underlying region is partitioned and has redundancy. * * @return true if region is partitioned and redundant. */ public final boolean isRedundant() { if (this.regionAttributes.getDataPolicy().withPartitioning()) { return this.regionAttributes.getPartitionAttributes() .getRedundantCopies() > 0; } return false; }
private void verifyPRs() { Set<Region<?, ?>> rootRegions = CacheHelper.getCache().rootRegions(); Set<Region> regionSet = new HashSet(rootRegions); for (Region aRegion: rootRegions) { regionSet.addAll(aRegion.subregions(true)); } for (Region aRegion: regionSet) { if (aRegion.getAttributes().getDataPolicy().withPartitioning()) { verifyPR(aRegion); } } }
public static void HydraTask_reExecuteFunctionDistributedRegion() { if (aRegion.getAttributes().getDataPolicy() == DataPolicy.NORMAL) { hydra.Log .getLogWriter() .info( "This node has the region with normal datapolicy. Hence not executing."); return; } testInstance.reExecuteFunctionDistributedRegion(); }
public static <K, V> PartitionedRegionBridge<K, V> getInstance(Region<K, V> region) { if (region.getAttributes().getDataPolicy().withHDFS()) { PartitionedRegionBridge<K, V> bridge = new HDFSRegionBridge<K, V>(region); return bridge; } else { return new PartitionedRegionBridge<K, V> (region); } }
public static <K, V> PartitionedRegionBridge<K, V> getInstance(Region<K, V> region) { if (region.getAttributes().getDataPolicy().withHDFS()) { PartitionedRegionBridge<K, V> bridge = new HDFSRegionBridge<K, V>(region); return bridge; } else { return new PartitionedRegionBridge<K, V> (region); } }
@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(); } }
protected static boolean isLocalAccessor(CacheDistributionAdvisee region) { if (!region.getAttributes().getDataPolicy().withStorage()) { return true; } if (region.getAttributes().getPartitionAttributes() != null && region.getAttributes().getPartitionAttributes() .getLocalMaxMemory() == 0) { return true; } return false; }
protected static boolean isLocalAccessor(CacheDistributionAdvisee region) { if (!region.getAttributes().getDataPolicy().withStorage()) { return true; } if (region.getAttributes().getPartitionAttributes() != null && region.getAttributes().getPartitionAttributes() .getLocalMaxMemory() == 0) { return true; } return false; }
/** * Create a continuous query on the given pool * @param cq the CQ to create on the server */ public Object create(CqQueryImpl cq) { pool.getRITracker().addCq(cq, cq.isDurable()); byte regionDataPolicyOrdinal = cq.getCqBaseRegion()==null ? (byte) 0 : cq.getCqBaseRegion() .getAttributes().getDataPolicy().ordinal; return CreateCQOp.execute(this.pool, cq.getName(), cq.getQueryString(), CqStateImpl.RUNNING, cq.isDurable(), regionDataPolicyOrdinal); }
public void testREPLICATE_PROXY() throws CacheException { CacheCreation cache = new CacheCreation(); RegionCreation root = (RegionCreation) cache.createRegion("replicateProxy", "REPLICATE_PROXY"); testXml(cache); GemFireCacheImpl c = (GemFireCacheImpl) getCache(); Region r = c.getRegion("replicateProxy"); assertNotNull(r); RegionAttributes ra = r.getAttributes(); assertEquals(DataPolicy.EMPTY, ra.getDataPolicy()); assertEquals(Scope.DISTRIBUTED_ACK, ra.getScope()); }