/** * Adds a asyncEventQueueId to the RegionAttributes * * @param asyncEventQueueId id of AsyncEventQueue * @return a reference to this RegionFactory instance * @since 7.0 */ public RegionFactory<K,V> addAsyncEventQueueId(String asyncEventQueueId) { this.attrsFactory.addAsyncEventQueueId(asyncEventQueueId); return this; }
/** * Adds a asyncEventQueueId to the RegionAttributes * * @param asyncEventQueueId id of AsyncEventQueue * @return a reference to this RegionFactory instance * @since 7.0 */ public RegionFactory<K,V> addAsyncEventQueueId(String asyncEventQueueId) { this.attrsFactory.addAsyncEventQueueId(asyncEventQueueId); return this; } /**
public static void createPersistentReplicatedRegionWithAsyncEventQueue( String regionName, String asyncQueueIds, Boolean offHeap) { AttributesFactory fact = new AttributesFactory(); if(asyncQueueIds != null){ StringTokenizer tokenizer = new StringTokenizer(asyncQueueIds, ","); while (tokenizer.hasMoreTokens()){ String asyncQueueId = tokenizer.nextToken(); fact.addAsyncEventQueueId(asyncQueueId); } } fact.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); fact.setEnableOffHeapMemory(offHeap); RegionFactory regionFactory = cache.createRegionFactory(fact.create()); Region r = regionFactory.create(regionName); assertNotNull(r); }
public static void createReplicatedRegionWithAsyncEventQueue( String regionName, String asyncQueueIds, Boolean offHeap) { ExpectedException exp1 = addExpectedException(ForceReattemptException.class .getName()); try { AttributesFactory fact = new AttributesFactory(); if (asyncQueueIds != null) { StringTokenizer tokenizer = new StringTokenizer(asyncQueueIds, ","); while (tokenizer.hasMoreTokens()) { String asyncQueueId = tokenizer.nextToken(); fact.addAsyncEventQueueId(asyncQueueId); } } fact.setDataPolicy(DataPolicy.REPLICATE); fact.setEnableOffHeapMemory(offHeap); RegionFactory regionFactory = cache.createRegionFactory(fact.create()); Region r = regionFactory.create(regionName); assertNotNull(r); } finally { exp1.remove(); } }
public void test_GatewaySenderIdAndAsyncEventId() { cache = new CacheFactory().create(); AttributesFactory factory = new AttributesFactory(); factory.addGatewaySenderId("ln"); factory.addGatewaySenderId("ny"); factory.addAsyncEventQueueId("Async_LN"); RegionAttributes attrs = factory.create(); Set<String> senderIds = new HashSet<String>(); senderIds.add("ln"); senderIds.add("ny"); Set<String> attrsSenderIds = attrs.getGatewaySenderIds(); assertEquals(senderIds, attrsSenderIds); Region r = cache.createRegion("Customer", attrs); assertEquals(senderIds, ((LocalRegion)r).getGatewaySenderIds()); }
public static void createPersistentPartitionedRegionWithAsyncEventQueue( String regionName, String asyncEventQueueId, Boolean offHeap) { AttributesFactory fact = new AttributesFactory(); PartitionAttributesFactory pfact = new PartitionAttributesFactory(); fact.setDataPolicy(DataPolicy.PERSISTENT_PARTITION); pfact.setTotalNumBuckets(16); fact.setPartitionAttributes(pfact.create()); fact.setEnableOffHeapMemory(offHeap); if (asyncEventQueueId != null) { StringTokenizer tokenizer = new StringTokenizer(asyncEventQueueId, ","); while (tokenizer.hasMoreTokens()) { String asyncId = tokenizer.nextToken(); fact.addAsyncEventQueueId(asyncId); } } Region r = cache.createRegionFactory(fact.create()).create(regionName); assertNotNull(r); }
afact.setEnableGateway(true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId); gatewayId = identifier(Limits.MAX_IDENTIFIER_LENGTH, true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId);
afact.setEnableGateway(true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId); gatewayId = identifier(Limits.MAX_IDENTIFIER_LENGTH, true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId);
afact.setEnableGateway(true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId); gatewayId = identifier(Limits.MAX_IDENTIFIER_LENGTH, true); if (isAsyncListener) { afact.addAsyncEventQueueId(gatewayId);
if (aeqds != null) { for (AsyncEventQueueDescription aeqd : aeqds) { f.addAsyncEventQueueId(aeqd.getName());
attr.addAsyncEventQueueId("parallelQueue");