/** * @param logWriter * @param criticalState */ public MemoryHog(String n, Cache c, AtomicBoolean critical) { this.name = n; this.cache = c; this.tenuredData = new RegionFactory().setScope(Scope.LOCAL).create(this.name); this.criticalState = critical; }
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.EMPTY); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.EMPTY); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.EMPTY); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setDataPolicy(DataPolicy.REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
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 run() { Cache cache = getCache(); RegionFactory rf = new RegionFactory(); rf.setScope(Scope.DISTRIBUTED_ACK); rf.setConcurrencyChecksEnabled(false); rf.setDataPolicy(DataPolicy.REPLICATE); rf.create("region"); } });
@Override public Object call() throws Exception { RegionFactory<String, String> rf = getCache().createRegionFactory(); rf.setEntryTimeToLive(new ExpirationAttributes(1, ExpirationAction.DESTROY)); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(regionName); return null; } });
public void run() { Cache cache = getCache(); RegionFactory regionFactory = cache.createRegionFactory(); regionFactory.setDiskStoreName(regionName); regionFactory.setDiskSynchronous(true); regionFactory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); regionFactory.setScope(Scope.DISTRIBUTED_ACK); regionFactory.create(regionName); } });
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() { props.setProperty(DistributionConfig.NAME_NAME, "sleeper"); getSystem(props); LogWriter log = system.getLogWriter(); log.info("<ExpectedException action=add>service failure</ExpectedException>"); log.info("<ExpectedException action=add>com.gemstone.gemfire.ForcedDisconnectException</ExpectedException>"); RegionFactory rf = new RegionFactory(); Region r = rf.setScope(Scope.DISTRIBUTED_ACK) .setDataPolicy(DataPolicy.REPLICATE) .addCacheListener(getSleepingListener(true)) .create("testRegion"); myCache = r.getCache(); } });
public void testSetScope() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(LOCAL); r1 = factory.setScope(Scope.GLOBAL).create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(Scope.GLOBAL, ra.getScope()); } finally { cleanUpRegion(r1); } } public void testSetDataPolicy() throws CacheException, IOException
public void testSetLockGrantor() throws CacheException, IOException { Cache c = createCache(); Region r1 = null; try { RegionFactory factory = c.createRegionFactory(REPLICATE); r1 = factory.setScope(Scope.GLOBAL).setLockGrantor(true).create(this.r1Name); RegionAttributes ra = r1.getAttributes(); assertEquals(true, ra.isLockGrantor()); } finally { cleanUpRegion(r1); } }
public void run() { Cache cache = getCache(); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(host), port); pf.setSubscriptionEnabled(true); pf.create(name); RegionFactory rf = new RegionFactory(); rf.setEnableOffHeapMemory(isOffHeapEnabled()); rf.setScope(Scope.LOCAL); rf.setPoolName(name); Region region = rf.create(name); region.registerInterest("ALL_KEYS"); } });
public void run() { try { final RegionFactory f; if (VM.getCurrentVMNum() == 0) { f = getCache().createRegionFactory(getRegionAttributes(RegionShortcut.LOCAL.toString())); f.setScope(getRegionAttributes().getScope()); } else { f = getCache().createRegionFactory(getRegionAttributes()); } CCRegion = (LocalRegion)f.create(name); } catch (CacheException ex) { fail("While creating region", ex); } } };
public void run() { try { final RegionFactory f; if (VM.getCurrentVMNum() == 0) { f = getCache().createRegionFactory(getRegionAttributes(RegionShortcut.LOCAL.toString())); f.setScope(getRegionAttributes().getScope()); } else { f = getCache().createRegionFactory(getRegionAttributes()); } CCRegion = (LocalRegion)f.create(regionName); } catch (CacheException ex) { fail("While creating region", ex); } } };