protected AttributesFactory getServerCacheAttributesFactory() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.REPLICATE); return factory; }
/** * Returns region attributes for a <code>GLOBAL</code> region */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); return factory.create(); }
public void run2() throws CacheException { AttributesFactory f = new AttributesFactory(); f.setScope(Scope.DISTRIBUTED_ACK); createRegion(rgnName, f.create()); } });
/** * Returns region attributes for a <code>GLOBAL</code> region */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.GLOBAL); factory.setDataPolicy(DataPolicy.REPLICATE); factory.setConcurrencyChecksEnabled(true); return factory.create(); }
public void run2() throws CacheException { AttributesFactory fac = new AttributesFactory(); fac.setScope(getRegionScope()); RegionAttributes attr = fac.create(); createRootRegion(name, attr); } });
public void run2() throws CacheException { AttributesFactory fac = new AttributesFactory(); fac.setScope(getRegionScope()); RegionAttributes attr = fac.create(); createRootRegion(name, attr); } });
public void run2() throws CacheException { getCache(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); BridgeTestCase.configureConnectionPool(factory, hostName, port, -1, false, -1, -1, null); createRegion(regionName, factory.create()); } });
@Override public void run2() throws CacheException { Cache cache = getCache(); AttributesFactory attr = new AttributesFactory(); attr.setScope(Scope.DISTRIBUTED_ACK); attr.setDataPolicy(DataPolicy.REPLICATE); cache.createRegion(replRegion, attr.create()); } };
public void run() { try { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.EMPTY); createRegion(name,factory.create()); } catch (CacheException ex) { fail("While creating empty region", ex); } } });
@Override public Object call() throws Exception { Cache cache = getCache(); AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); RegionFactory rf = cache.createRegionFactory(af.create()); Region r = rf.create(regionName); assertNotNull(r); assertTrue(r.getAttributes().getConcurrencyChecksEnabled()); return null; } });
public void testTxDistributedRegion() throws Exception { AttributesFactory attr = new AttributesFactory(); attr.setScope(Scope.DISTRIBUTED_ACK); Region region = cache.createRegion("DistributedRegion", attr.create()); checkOpRejection(region, true, true); region.close(); assertEquals(0 + SYSTEM_LISTENERS, cache.getResourceManager(false). getResourceListeners(ResourceType.HEAP_MEMORY).size()); }
public void run2() throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); // setting the following makes things legal factory.setDataPolicy(DataPolicy.NORMAL); factory.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL)); createRootRegion(factory.create()); } });
/** * Creates the root region in a remote VM */ private static void remoteCreateCache() throws Exception { Assert.assertTrue(cache == null, "cache should be null"); DistributedCacheTestCase x = new DistributedCacheTestCase("Lame") { }; cache = CacheFactory.create(x.getSystem()); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_NO_ACK); cache.createRegion("root", factory.create()); }
/** * Puts multiple keys value pair in RegionE. * */ public static void putKeysValuesRegionE() throws Exception{ Cache cache = CacheUtil.createCache(); AttributesFactory fac = new AttributesFactory(); fac.setScope(Scope.DISTRIBUTED_ACK); fac.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes attr = fac.createRegionAttributes(); Region region = CacheUtil.createRegion(regionNameE, attr); putKeysValues(region); }
@Override public void run2() throws CacheException { getLonerSystem(); getCache(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); factory.setConcurrencyChecksEnabled(false); BridgeTestCase.configureConnectionPool(factory,host0,port,port2,true,-1,-1, null); createRegion(name, factory.create()); } };
public void testTxSubRegion() throws Exception { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); Region subRegion = cache.createRegion("local1", factory.create()) .createSubregion("sub1", factory.create()); checkOpRejection(subRegion, true, true); subRegion.close(); assertEquals(1 + SYSTEM_LISTENERS, cache.getResourceManager(false). getResourceListeners(ResourceType.HEAP_MEMORY).size()); //root region is still present }
@Override public void run2() { AttributesFactory af = new AttributesFactory(); af.setDataPolicy(DataPolicy.REPLICATE); af.setScope(Scope.DISTRIBUTED_ACK); getCache().createRegion(rgnName1, af.create()); getCache().createRegion(rgnName2, af.create()); } };
public static void createRegionInVm0() throws Exception { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.REPLICATE); factory.setConcurrencyChecksEnabled(true); RegionAttributes attr = factory.create(); region = new MapClearGIITest("dumb object to get cache").getCache().createRegion("map", attr); // region = region.createSubregion("map",attr); getLogWriter().info("Region in VM0 created "); } /*
@Override public void run2() throws CacheException { getLogWriter().info("[doTestSystemClientEventsInServer] create system bridge client"); assertTrue(getSystem(serverProperties).isConnected()); assertFalse(getCache().isClosed()); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); BridgeTestCase.configureConnectionPool(factory, getServerHostName(host), ports, false, -1, -1, null); createRegion(name, factory.create()); assertNotNull(getRootRegion().getSubregion(name)); } };
@Override public void run2() throws CacheException { getLogWriter().info("[testLonerClientEventsInServer] create system bridge client"); getSystem(serverProperties); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); BridgeTestCase.configureConnectionPool(factory, getServerHostName(host), ports, false, -1, -1, null); createRegion(name, factory.create()); assertNotNull(getRootRegion().getSubregion(name)); } };