protected int startBridgeServer(final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe, final boolean useGroupsProperty) throws IOException { CacheFactory cacheFactory = new CacheFactory().set(MCAST_PORT, "0").set(LOCATORS, locators); if (useGroupsProperty && groups != null) { cacheFactory.set(GROUPS, StringUtils.join(groups, ",")); } Cache cache = cacheFactory.create(); for (String regionName : regions) { cache.createRegionFactory(RegionShortcut.REPLICATE).setEnableSubscriptionConflation(true) .create(regionName); } CacheServer server = cache.addCacheServer(); server.setPort(0); if (!useGroupsProperty) { server.setGroups(groups); } server.setLoadProbe(probe); server.start(); remoteObjects.put(CACHE_KEY, cache); return server.getPort(); }
protected int startBridgeServerWithEmbeddedLocator(final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe) throws IOException { Cache cache = new CacheFactory().set(MCAST_PORT, "0").set(LOCATORS, locators) .set(START_LOCATOR, locators).create(); for (String regionName : regions) { cache.createRegionFactory(RegionShortcut.REPLICATE).setEnableSubscriptionConflation(true) .create(regionName); } CacheServer server = cache.addCacheServer(); server.setGroups(groups); server.setLoadProbe(probe); server.setPort(0); server.start(); remoteObjects.put(CACHE_KEY, cache); return server.getPort(); }
factory.setEnableSubscriptionConflation(regionAttributes.isEnableSubscriptionConflation());
.thenAnswer(newSetter(enableAsyncConflation, mockRegionFactory)); when(mockRegionFactory.setEnableSubscriptionConflation(anyBoolean())) .thenAnswer(newSetter(enableSubscriptionConflation, mockRegionFactory));
regionFactory.setDiskSynchronous(regionAttributes.isDiskSynchronous()); regionFactory.setEnableAsyncConflation(regionAttributes.getEnableAsyncConflation()); regionFactory.setEnableSubscriptionConflation(regionAttributes.getEnableSubscriptionConflation()); regionFactory.setEntryIdleTimeout(regionAttributes.getEntryIdleTimeout()); regionFactory.setEntryTimeToLive(regionAttributes.getEntryTimeToLive());
regionFactory.setDiskSynchronous(regionAttributes.isDiskSynchronous()); regionFactory.setEnableAsyncConflation(regionAttributes.getEnableAsyncConflation()); regionFactory.setEnableSubscriptionConflation(regionAttributes.getEnableSubscriptionConflation()); regionFactory.setEntryIdleTimeout(regionAttributes.getEntryIdleTimeout()); regionFactory.setEntryTimeToLive(regionAttributes.getEntryTimeToLive());