public Object call() throws Exception { getCache().createRegionFactory(RegionShortcut.REPLICATE_PROXY).setConcurrencyChecksEnabled(true).create(REP_REG_NAME); getCache().createRegionFactory(RegionShortcut.PARTITION_PROXY).setConcurrencyChecksEnabled(true).create(PR_REG_NAME); return null; } });
public Object call() throws Exception { RegionFactory< Integer, TestDataCloseDuringRegionOp> rf = getCache().createRegionFactory(RegionShortcut.REPLICATE); rf.setConcurrencyChecksEnabled(false); rf.create( replName); return null; } };
public Object call() throws Exception { RegionFactory<Integer,TestDataCloseDuringRegionOp> rf = getCache().createRegionFactory(RegionShortcut.REPLICATE_PROXY); rf.setConcurrencyChecksEnabled(false); rf.create( replName); return null; } };
public Object call() throws Exception { getCache().createRegionFactory(RegionShortcut.REPLICATE).setConcurrencyChecksEnabled(true).create(REP_REG_NAME); getCache().createRegionFactory(RegionShortcut.PARTITION_REDUNDANT).setConcurrencyChecksEnabled(true).create(PR_REG_NAME); return null; } });
protected Region createReplicateRegion() { return getCache().createRegionFactory(RegionShortcut.REPLICATE).setConcurrencyChecksEnabled(true).create(REP_REG_NAME); }
protected Region createPartitionedRegion() { return getCache().createRegionFactory(RegionShortcut.PARTITION).setConcurrencyChecksEnabled(true).create(PR_REG_NAME); }
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setScope(Scope.DISTRIBUTED_ACK); rf.setConcurrencyChecksEnabled(false); rf.setDataPolicy(DataPolicy.REPLICATE); rf.create("region"); } });
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setScope(Scope.DISTRIBUTED_ACK); rf.setConcurrencyChecksEnabled(false); rf.setDataPolicy(DataPolicy.EMPTY); rf.create("region"); } });
public void testNoConcurrencyChecks () { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); rf.setConcurrencyChecksEnabled(false); try { LocalRegion region = (LocalRegion) rf.create(REGION_NAME); fail("Expected to get an IllegalStateException because concurrency checks can't be disabled"); } catch(IllegalStateException expected) { //do nothing } }
/** * Creates and returns the test region. * @param concurrencyChecksEnabled concurrency checks will be enabled if true. */ protected Region<Object,Object> createRegion(boolean concurrencyChecksEnabled) { return getCache().createRegionFactory(getRegionShortcut()).setEnableOffHeapMemory(true).setConcurrencyChecksEnabled(concurrencyChecksEnabled).create(getRegionName()); }
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setScope(Scope.DISTRIBUTED_ACK); rf.setConcurrencyChecksEnabled(false); rf.setDataPolicy(DataPolicy.NORMAL); rf.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL)); rf.create("region"); } });
public void run() { Cache cache = getCache(); RegionFactory<Object, Object> rf = cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT); PartitionAttributesFactory paf = new PartitionAttributesFactory(); paf.setRedundantCopies(1); paf.setTotalNumBuckets(3); rf.setPartitionAttributes(paf.create()); rf.setConcurrencyChecksEnabled(true); rf.create("partitioned"); rf = cache.createRegionFactory(RegionShortcut.REPLICATE); rf.setConcurrencyChecksEnabled(true); rf.create("replicate"); try { startCacheServer(); } catch (Exception ex) { fail("While starting CacheServer", ex); } } };
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setEnableOffHeapMemory(isOffHeapEnabled()); rf.setDataPolicy(DataPolicy.PARTITION); PartitionAttributesFactory paf = new PartitionAttributesFactory(); paf.setRedundantCopies(1); paf.setTotalNumBuckets(5); rf.setPartitionAttributes(paf.create()); rf.setEvictionAttributes(EvictionAttributes.createLRUEntryAttributes(1)); rf.setConcurrencyChecksEnabled(false); rf.create(name); } });
rf = cache.createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT); rf.setConcurrencyChecksEnabled(true); region = rf.create(regionName);
rf = cache.createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT); rf.setConcurrencyChecksEnabled(true); region = rf.create(regionName);
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setEnableOffHeapMemory(isOffHeapEnabled()); rf.setDataPolicy(DataPolicy.PARTITION); PartitionAttributesFactory paf = new PartitionAttributesFactory(); paf.setRedundantCopies(1); paf.setTotalNumBuckets(5); paf.setLocalMaxMemory(0); rf.setPartitionAttributes(paf.create()); rf.setEvictionAttributes(EvictionAttributes.createLRUEntryAttributes(1)); rf.setConcurrencyChecksEnabled(false); if(allContent) { // rf.initCacheListeners(new CacheListener [] { new MyListener()}); rf.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL)); } rf.create(name); } });
factory.setConcurrencyChecksEnabled(regionCreateArgs.isConcurrencyChecksEnabled());
factory.setConcurrencyChecksEnabled(regionCreateArgs.isConcurrencyChecksEnabled());