@SuppressWarnings("deprecation") public BridgeServer addBridgeServer() { return (BridgeServer)addCacheServer(); }
public CacheServer addCacheServer() { return addCacheServer(false); }
public CacheServer addCacheServer() { return addCacheServer(false); }
public void start() throws IOException { if (receiver == null) { //add a cache server and set its port to random port. See defect 45630 for more details. receiver = ((CacheCreation)this.cache).addCacheServer(true); receiver.setPort(endPort + 1); } }
public void start() throws IOException { if (receiver == null) { //add a cache server and set its port to random port. See defect 45630 for more details. receiver = ((CacheCreation)this.cache).addCacheServer(true); receiver.setPort(endPort + 1); } }
public void testBridgeLoadProbe() { CacheCreation cache = new CacheCreation(); CacheServer server = cache.addCacheServer(); server.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); server.setLoadProbe(new MyLoadProbe()); testXml(cache); Cache c= getCache(); server = c.getCacheServers().get(0); Assert.assertEquals(MyLoadProbe.class,server.getLoadProbe().getClass()); }
CacheServer bridge = this.cache.addCacheServer(); String port = atts.getValue(PORT); if (port != null) {
public void testLoadPollInterval() { CacheCreation cache = new CacheCreation(); CacheServer server = cache.addCacheServer(); server.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); server.setLoadPollInterval(12345); testXml(cache); Cache c = getCache(); server = c.getCacheServers().get(0); Assert.assertEquals(12345, server.getLoadPollInterval()); }
public void testOneCacheServerGroups() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); String[] groups = new String[]{"group1"}; bs.setGroups(groups); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(Arrays.asList(groups), Arrays.asList(server.getGroups())); } public void testTwoCacheServerGroups() throws CacheException {
public void testTwoCacheServerGroups() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); String[] groups = new String[]{"group1", "group2"}; bs.setGroups(groups); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(Arrays.asList(groups), Arrays.asList(server.getGroups())); } public void testDefaultCacheServerBindAddress() throws CacheException {
public void testDefaultCacheServerBindAddress() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(CacheServer.DEFAULT_BIND_ADDRESS, server.getBindAddress()); } public void testCacheServerBindAddress() throws CacheException {
public void testCacheServerDisableTcpNoDelay() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer cs = cache.addCacheServer(); cs.setTcpNoDelay(false); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); }
public void testCacheServerEnableTcpNoDelay() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer cs = cache.addCacheServer(); cs.setTcpNoDelay(true); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); }
public void testCacheServerBindAddress() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); final String BA = ALIAS1; bs.setBindAddress(BA); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(BA, server.getBindAddress()); } public void testCacheServerHostnameForClients() throws CacheException {
/** * Tests the groups subelement on bridge-server. */ public void testDefaultCacheServerGroups() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); bs.setGroups(CacheServer.DEFAULT_GROUPS); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(CacheServer.DEFAULT_GROUPS, server.getGroups()); } public void testOneCacheServerGroups() throws CacheException {
public void testCacheServerHostnameForClients() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer bs = cache.addCacheServer(); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); final String BA = ALIAS1; bs.setBindAddress(BA); bs.setHostnameForClients("clientHostName"); testXml(cache); Cache c = getCache(); assertNotNull(c); CacheServer server = (CacheServer)cache.getCacheServers().iterator().next(); assertNotNull(server); assertEquals(BA, server.getBindAddress()); assertEquals("clientHostName", server.getHostnameForClients()); } public void testExplicitConnectionPool() throws CacheException {
attrs.setDataPolicy(DataPolicy.REPLICATE); creation.createRegion(getUniqueName(), attrs); creation.addCacheServer();
public void testClientSubscriptionQueueUsingDefaultDS() throws CacheException { CacheCreation cache = new CacheCreation(); cache.setMessageSyncInterval(3445); CacheServer bs = cache.addCacheServer(); ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig(); csc.setEvictionPolicy("entry");
public void testBridgeAttributesRelatedToHAOverFlow65() throws CacheException { CacheCreation cache = new CacheCreation(); cache.setMessageSyncInterval(3445); CacheServer bs = cache.addCacheServer(); ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig(); csc.setEvictionPolicy("entry");
CacheCreation cache = new CacheCreation(); cache.setMessageSyncInterval(3445); CacheServer bs = cache.addCacheServer(); ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig(); csc.setEvictionPolicy("entry");