protected AttributesFactory getServerCacheAttributesFactory() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.REPLICATE); return factory; }
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.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); factory.setConcurrencyChecksEnabled(true); return factory.create(); }
/** * Helper Methods */ private void createLocalRegion() throws ParseException { Cache cache = CacheUtils.getCache(); AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.setDataPolicy(DataPolicy.NORMAL); RegionAttributes regionAttributes = attributesFactory.create(); Region region = cache.createRegion(regionName, regionAttributes); }
private static void createCache() throws Exception { Properties props = new Properties(); props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false"); new InterestListDUnitTest("temp").createCache(props); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEnableSubscriptionConflation(true); factory.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes attrs = factory.create(); cache.createRegion(REGION_NAME, attrs); }
/** * 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(); }
private void createReplicatedRegion() throws ParseException { Cache cache = CacheUtils.getCache(); AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.setDataPolicy(DataPolicy.REPLICATE); RegionAttributes regionAttributes = attributesFactory.create(); Region region = cache.createRegion(regionName, regionAttributes); for (int i = 1; i <= numElem; i++) { putData(i, region); } }
private void createReplicatedRegion(String regionName, boolean synchMaintenance) throws ParseException { Cache cache = CacheUtils.getCache(); AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.setDataPolicy(DataPolicy.REPLICATE); attributesFactory.setIndexMaintenanceSynchronous(synchMaintenance); RegionAttributes regionAttributes = attributesFactory.create(); region = cache.createRegion(regionName, regionAttributes); }
@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); } } });
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()); } });
public Object call() throws Exception { AttributesFactory<Integer, String> af = new AttributesFactory<Integer, String>(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.EMPTY); af.setConcurrencyChecksEnabled(getConcurrencyChecksEnabled()); getCache().createRegionFactory(af.create()).create(EMPTY_REGION); af.setDataPolicy(DataPolicy.REPLICATE); getCache().createRegionFactory(af.create()).create(D_REFERENCE); return null; } });
/** * 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); }
public void run2() throws CacheException { getLogWriter().info("testBug30705: Start creating Mirrored Region"); AttributesFactory factory = new AttributesFactory(getRegionAttributes()); factory.setDataPolicy(DataPolicy.REPLICATE); createRegion(name, factory.create()); getLogWriter().info("testBug30705: Finished creating Mirrored Region"); } };
public void createDistRegion() { final AttributesFactory factory = new AttributesFactory(); factory.setEnableOffHeapMemory(getOffHeapEnabled()); factory.setDataPolicy(DataPolicy.NORMAL); factory.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes( null, EvictionAction.LOCAL_DESTROY)); DistributedRegion distRegion = (DistributedRegion)cache.createRegion("DR1", factory.create()); assertNotNull(distRegion); }
@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 void run2() throws CacheException { getLonerSystem(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); factory.setConcurrencyChecksEnabled(false); // create bridge writer BridgeTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null); factory.addCacheListener(new ControlListener()); factory.setDataPolicy(DataPolicy.EMPTY); // make sure empty works with client publishers createRegion(name, factory.create()); } };
public void run2() throws CacheException { RegionAttributes ra = getRegionAttributes(); AttributesFactory factory = new AttributesFactory(ra); if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.REPLICATE); createRegion(name, factory.create()); } };
public void run2() throws CacheException { RegionAttributes ra = getRegionAttributes(); AttributesFactory factory = new AttributesFactory(ra); if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.REPLICATE); createRegion(name, factory.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 "); } /*