public void run2() throws CacheException { Cache cache2 = getCache(); cache2.addCacheServer(); assertEquals(2, cache2.getCacheServers().size()); } });
public void run() { Cache cache = getCache(); CacheServer cs = cache.addCacheServer(); cs.setPort(port); try { cs.start(); } catch (IOException e) { System.out.println("Received expected "+e.getMessage()); } } });
private static CacheServer addCacheServer() throws Exception { CacheServer s = cache.addCacheServer(); int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET) ; s.setPort(port); s.start(); return s; }
public void run() { InternalDistributedSystem system = getSystem(); Cache cache = CacheFactory.create(system); CacheServer server = cache.addCacheServer(); try { server.start(); } catch (IOException e) { fail("failed to start server", e); } } });
protected void startCacheServer() throws IOException { CacheServer cacheServer = getCache().addCacheServer(); cacheServer.setPort(0); cacheServer.start(); cacheServerPort = cacheServer.getPort(); }
public Object call() throws Exception { createRegion(accessor, 0, null); if (startServer) { int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); CacheServer s = getCache().addCacheServer(); s.setPort(port); s.start(); return port; } return 0; } });
private CacheServer createCacheServer(Cache cache) { CacheServer server = cache.addCacheServer(); server.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); try { server.start(); } catch (IOException e) { fail("got exception", e); } return server; }
public Object call() throws Exception { int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); CacheServer s = getCache().addCacheServer(); s.setPort(port); s.start(); return port; } });
/** * Create a bridge server on the given port without starting it. * * @since 5.0.2 */ protected void createBridgeServer(int port) throws IOException { CacheServer bridge = getCache().addCacheServer(); bridge.setPort(port); bridge.setMaxThreads(getMaxThreads()); bridgeServerPort = bridge.getPort(); }
public void run() { Cache cache =getCache(); CacheServer server = cache.addCacheServer(); server.setNotifyBySubscription(true); server.setPort(port); try { server.start(); } catch (IOException e) { fail("IO Exception", e); } } });
public Object call() throws IOException { DynamicRegionFactory.get().open(); Cache cache = getCache(); CacheServer bridge = cache.addCacheServer(); bridge.setPort(port); bridge.setNotifyBySubscription(true); bridge.start(); return null; } });
@Override public Object call() throws Exception { Region r1 = getCache().createRegionFactory(RegionShortcut.REPLICATE) .create(regionName); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite(); server.setPort(port); server.start(); return port; } });
@Override public Object call() throws Exception { Region r1 = getCache().createRegionFactory(RegionShortcut.PARTITION) .create(regionName); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite(); server.setPort(port); server.start(); return port; } });
public Object call() throws Exception { AttributesFactory af = new AttributesFactory(); //af.setScope(Scope.DISTRIBUTED_ACK); af.setDataPolicy(DataPolicy.PARTITION); 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 { getSystem(getServerProperties(mcastPort)); GemFireCacheImpl cache = (GemFireCacheImpl)getCache(); cache.setCopyOnRead(true); AttributesFactory factory = new AttributesFactory(); CacheServer cacheServer = getCache().addCacheServer(); cacheServer.setPort(port); cacheServer.start(); QueryTestUtils.setCache(cache); return null; } });
@Override public Object call() throws Exception { ((GemFireCacheImpl) getCache()).setReadSerialized(true); Region r1 = getCache().createRegionFactory(RegionShortcut.REPLICATE) .create(regName); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite(); 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; } };
@Override public Object call() throws Exception { CacheFactory cf = new CacheFactory() .setPdxSerializer(new MyPdxSerializer()); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); Region r = getCache().createRegionFactory(RegionShortcut.REPLICATE).create("pdxtest"); return port; } };
public Object call() throws Exception { RegionFactory<Object, Object> rf = getCache().createRegionFactory(shortcut); if (!shortcut.equals(RegionShortcut.REPLICATE)) { rf.setPartitionAttributes(new PartitionAttributesFactory().setRedundantCopies(2).create()); } rf.create("region"); CacheServer server = getCache().addCacheServer(); int port = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(port); server.start(); return port; } };