public Object call() throws Exception { Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); getSystem(props); Cache cache = getCache(); HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); DataSerializer.writeObject(new SimpleClass(57, (byte) 3), out); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port); try { pf.create("pool"); fail("should have received an exception"); } catch(PdxInitializationException expected) { //do nothing } return null; } };
public Object call() throws Exception { Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); getSystem(props); Cache cache = getCache(); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port); pf.create("pool"); AttributesFactory af = new AttributesFactory(); af.setPoolName("pool"); cache.createRegion("testSimplePdx", af.create()); return null; } };
public Object call() throws Exception { Properties props = new Properties(); props.setProperty("locators", ""); props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId); getSystem(props); AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.REPLICATE); createRootRegion(regionName, af.create()); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); return port; } };
public Object call() throws Exception { disconnectFromDS(); Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); getSystem(props); Cache cache = getCache(); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port); pf.create("pool"); int hubPort= AvailablePortHelper.getRandomAvailableTCPPort(); GatewayHub hub = cache.addGatewayHub("hub", hubPort); hub.start(); try { HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); DataSerializer.writeObject(new SimpleClass(57, (byte) 3), out); // hub.addGateway("gateway"); fail("should have received an exception"); } catch(PdxInitializationException expected) { //do nothing } return null; } });
public Object call() throws Exception { disconnectFromDS(); Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); getSystem(props); Cache cache = getCache(); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port); pf.create("pool"); HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); DataSerializer.writeObject(new SimpleClass(57, (byte) 3), out); try { int hubPort= AvailablePortHelper.getRandomAvailableTCPPort(); GatewayHub hub = cache.addGatewayHub("hub", hubPort); // hub.addGateway("gateway"); hub.start(); fail("should have received an exception"); } catch(PdxInitializationException expected) { //do nothing } return null; } });
public Object call() throws Exception { AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.REPLICATE); createRootRegion("testSimplePdx", af.create()); CacheServer server = getCache().addCacheServer(); server.setPort(port); server.start(); return port; } };
public Object call() throws Exception { AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.REPLICATE); createRootRegion("testSimplePdx", af.create()); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); return port; } };
public Object call() throws Exception { AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.EMPTY); createRootRegion("testSimplePdx", af.create()); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); return port; } };
public Object call() throws Exception { Properties props = new Properties(); props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); getSystem(props); Cache cache = getCache(); PoolFactory pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port1); pf.create("pool1"); pf = PoolManager.createFactory(); pf.addServer(getServerHostName(vm0.getHost()), port2); pf.create("pool2"); AttributesFactory af = new AttributesFactory(); af.setPoolName("pool1"); cache.createRegion("region1", af.create()); af = new AttributesFactory(); af.setPoolName("pool2"); cache.createRegion("region2", af.create()); return null; } };
public Object call() throws Exception { CacheFactory cf = new CacheFactory(); if(persistentPdxRegistry) { cf.setPdxPersistent(true) .setPdxDiskStore("store"); } // Cache cache = getCache(cf); cache.createDiskStoreFactory() .setDiskDirs(getDiskDirs()) .create("store"); AttributesFactory af = new AttributesFactory(); af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); af.setDiskStoreName("store"); createRootRegion("testSimplePdx", af.create()); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); return port; } };