public Object call() throws IOException { Cache cache = getCache(); AttributesFactory af = new AttributesFactory(); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); startBridgeServer(serverPort, true); return null; } });
public Object call() throws IOException { Cache cache = getCache(); AttributesFactory af = new AttributesFactory(); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); startBridgeServer(serverPort, true); return null; } });
public Object call() throws IOException { Cache cache = getCache(); AttributesFactory af = new AttributesFactory(); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); startBridgeServer(serverPort, true); return null; } });
protected void startBridgeServer(int port, boolean notifyBySubscription) throws IOException { Cache cache = getCache(); BridgeServer bridge = cache.addBridgeServer(); bridge.setPort(port); bridge.setNotifyBySubscription(notifyBySubscription); bridge.start(); bridgeServerPort = bridge.getPort(); }
public Object call() { Cache cache = getCache(); PoolFactory factory = PoolManager.createFactory(); factory.addServer(getServerHostName(host), serverPort); factory.create("pool1"); AttributesFactory af = new AttributesFactory(); af.setDataPolicy(DataPolicy.DEFAULT); af.setScope(Scope.LOCAL); af.setPoolName("pool1"); af.setCacheWriter(new MyCacheWriter()); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); return null; } });
public Object call() { Cache cache = getCache(); PoolFactory factory = PoolManager.createFactory(); factory.addServer(getServerHostName(host), serverPort); factory.create("pool1"); AttributesFactory af = new AttributesFactory(); af.setDataPolicy(DataPolicy.DEFAULT); af.setScope(Scope.LOCAL); af.setPoolName("pool1"); af.setCacheLoader(new MyCacheLoader("loaded")); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); return null; } });
public Object call() { //Make sure we get a distributed system that has the locator useLocator = true; Cache cache = getCache(); useLocator = false; PoolFactory factory = PoolManager.createFactory(); factory.addServer(getServerHostName(host), serverPort); factory.create("pool1"); AttributesFactory af = new AttributesFactory(); af.setDataPolicy(DataPolicy.NORMAL); af.setScope(Scope.DISTRIBUTED_ACK); af.setPoolName("pool1"); af.setCacheLoader(new MyCacheLoader("loaded1")); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); return null; } };
public Object call() { //Make sure we get a distributed system that has the locator useLocator = true; Cache cache = getCache(); useLocator = false; PoolFactory factory = PoolManager.createFactory(); factory.addServer(getServerHostName(host), serverPort); factory.create("pool1"); AttributesFactory af = new AttributesFactory(); af.setDataPolicy(DataPolicy.NORMAL); af.setScope(Scope.DISTRIBUTED_ACK); af.setCacheLoader(new MyCacheLoader("loaded2")); af.setPoolName("pool1"); RegionAttributes attrs = af.create(); cache.createRegion(regionName, attrs); return null; } };