/** * For internal use only. * @since 6.5 */ protected RegionFactory(GemFireCacheImpl cache, RegionAttributes ra) { this.cache = cache; this.attrsFactory = new AttributesFactory<K,V>(ra); }
/** * For internal use only. * @since 6.5 */ protected RegionFactory(GemFireCacheImpl cache) { this.cache = cache; this.attrsFactory = new AttributesFactory<K,V>(); }
/** * For internal use only. * @since 6.5 */ protected RegionFactory(GemFireCacheImpl cache, RegionAttributes ra) { this.cache = cache; this.attrsFactory = new AttributesFactory<K,V>(ra); }
/** * Returns region attributes with a distributed-ack scope */ protected RegionAttributes getNonPRRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); return factory.create(); }
/** * Returns the attributes of a region to be tested. */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); factory.setConcurrencyChecksEnabled(false); return factory.create(); }
public void run2() throws CacheException { AttributesFactory fac = new AttributesFactory(); fac.setScope(Scope.DISTRIBUTED_ACK); RegionAttributes attr = fac.create(); createRootRegion(name, attr); } };
public static void createMirroredRegion(){ try{ AttributesFactory factory = new AttributesFactory(); factory.setDataPolicy(DataPolicy.REPLICATE); factory.setScope(Scope.DISTRIBUTED_ACK); RegionAttributes attr = factory.create(); mirroredRegion = cache.createRegion("mirrored", attr); } catch (Exception ex){ ex.printStackTrace(); } }//end of createCache
public void run2() throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); PoolFactory poolFactory = PoolManager.createFactory(); poolFactory.setReadTimeout(10 * 60 * 1000); // 10 mins. BridgeTestCase.configureConnectionPoolWithNameAndFactory(factory, host0, port, true, -1, -1, null, poolName, poolFactory); } };
/** * Returns region attributes for a <code>GLOBAL</code> region */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); factory.setConcurrencyChecksEnabled(true); return factory.create(); }
public void run2() throws CacheException { AttributesFactory fac = new AttributesFactory(); fac.setScope(Scope.DISTRIBUTED_ACK); fac.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes attr = fac.create(); createRootRegion(name, attr); } });
@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(); } }
public void run() { Cache cache = getCache(); AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.REPLICATE); Region region = cache.createRegion("region", af.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(); } }
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()); } });
public void run2() throws CacheException { createConnection(new String[] {roleA}); AttributesFactory fac = new AttributesFactory(); fac.setScope(getRegionScope()); RegionAttributes attr = fac.create(); createRootRegion(name, attr); } });
public static void createDistRegionWithMemEvictionAttr() { final AttributesFactory factory = new AttributesFactory(); factory.setDataPolicy(DataPolicy.NORMAL); factory.setEvictionAttributes(EvictionAttributes.createLRUMemoryAttributes( new ObjectSizerImpl(), EvictionAction.LOCAL_DESTROY)); DistributedRegion distRegion = (DistributedRegion)cache.createRegion("DR1", factory.create()); assertNotNull(distRegion); }
public void run2() throws CacheException { createConnection(new String[] {}); AttributesFactory fac = new AttributesFactory(); fac.setScope(getRegionScope()); fac.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes attr = fac.create(); Region region = createRootRegion(name, attr); region.put(key, val); } });
public void run() { try { AttributesFactory factory2 = new AttributesFactory(); factory2.setScope(Scope.DISTRIBUTED_ACK); factory2.setEarlyAck(false); factory2.setDataPolicy(DataPolicy.REPLICATE); getCache().createRegion(rgnName, factory2.create()); } catch (CacheException e) { fail("While creating region", e); } } });
public void run2() throws CacheException { getSystem(p); AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_NO_ACK); af.setDataPolicy(DataPolicy.REPLICATE); doTestPartialMessage_Listener = new ControlListener(); af.setCacheListener(doTestPartialMessage_Listener); createRootRegion("slowrec", af.create()); } });
public void run2() throws CacheException { getLonerSystem(); getCache(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); factory.setConcurrencyChecksEnabled(false); BridgeTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null); Region rgn = createRegion(name, factory.create()); rgn.registerInterestRegex(".*", false, false); } };