/** * Sets for this region whether or not acks are sent after an update is processed. * * @param earlyAck set to true for the acknowledgement to be sent prior to processing the update * @return a reference to this RegionFactory object * @see AttributesFactory#setEarlyAck(boolean) * @deprecated As of 6.5 this setting no longer has any effect. */ @Deprecated public RegionFactory<K,V> setEarlyAck(boolean earlyAck) { this.attrsFactory.setEarlyAck(earlyAck); return this; }
/** * Sets for this region whether or not acks are sent after an update is processed. * * @param earlyAck set to true for the acknowledgement to be sent prior to processing the update * @return a reference to this RegionFactory object * @see AttributesFactory#setEarlyAck(boolean) * @deprecated As of 6.5 this setting no longer has any effect. */ @Deprecated public RegionFactory<K,V> setEarlyAck(boolean earlyAck) { this.attrsFactory.setEarlyAck(earlyAck); return this; }
/** * Returns region attributes for a <code>GLOBAL</code> region */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); return factory.create(); }
/** * Returns region attributes with a distributed-ack scope */ protected RegionAttributes getNonPRRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); return factory.create(); }
protected RegionAttributes getRegionAttributes(Scope scope) { AttributesFactory factory = new AttributesFactory(); factory.setScope(scope); if (scope.isDistributedAck()) { factory.setEarlyAck(false); } return factory.create(); }
public void run2() throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); createRegion(name,factory.create()); } };
/** * Returns region attributes for a partitioned region with distributed-ack scope */ @Override protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setEarlyAck(false); factory.setPartitionAttributes((new PartitionAttributesFactory()).create()); return factory.create(); }
public void run2() throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setStatisticsEnabled(true); createRegion(name, factory.create()); } };
/** * Returns region attributes for a <code>GLOBAL</code> region */ protected RegionAttributes getRegionAttributes() { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.PRELOADED); factory.setEarlyAck(false); factory.setConcurrencyChecksEnabled(false); return factory.create(); }
protected Region getOrCreateRootRegion() throws CacheException { Region root = getRootRegion(); if (root == null) { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setStatisticsEnabled(true); root = createRootRegion(factory.create()); } return root; }
public void run() { try { AttributesFactory factory2 = new AttributesFactory(); factory2.setScope(Scope.DISTRIBUTED_ACK); factory2.setEarlyAck(false); factory2.setDataPolicy(DataPolicy.REPLICATE); getCache().createRegion(rgnName, factory2.create()); } catch (CacheException e) { fail("While creating region", e); } } });
public void run() { try { AttributesFactory factory2 = new AttributesFactory(); factory2.setScope(Scope.DISTRIBUTED_ACK); factory2.setEarlyAck(false); // factory.setDataPolicy(DataPolicy.REPLICATE); factory2.setMirrorType(MirrorType.KEYS); getCache().createRegion(rgnName, factory2.create()); } catch (CacheException e) { fail("While creating region", e); } } });
public void run() { try { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setStatisticsEnabled(true); Region region = createRegion(name,factory.create()); region.put(objectName,value); } catch (CacheException ex) { fail("While creating ACK region", ex); } } });
public void run() { try { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setStatisticsEnabled(true); Region region = createRegion(name,factory.create()); region.create(objectName,null); } catch (CacheException ex) { fail("While creating ACK region", ex); } } });
public void run() { try { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setStatisticsEnabled(true); Region region = createRegion(name,factory.create()); region.create(objectName,null); } catch (CacheException ex) { fail("While creating ACK region", ex); } } });
public void run2() throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setEvictionAttributes(EvictionAttributes .createLRUEntryAttributes(100, EvictionAction.OVERFLOW_TO_DISK)); File d = new File("DiskRegions" + ProcessMgr.getProcessId()); d.mkdirs(); DiskStoreFactory dsf = getCache().createDiskStoreFactory(); dsf.setDiskDirs(new File[]{d}); DiskStore ds = dsf.create(name); factory.setDiskStoreName(ds.getName()); createRegion(name, factory.create()); } };
public void run() { try { AttributesFactory factory2 = new AttributesFactory(); factory2.setScope(Scope.DISTRIBUTED_ACK); factory2.setEarlyAck(false); factory2.setDataPolicy(DataPolicy.REPLICATE); Region rgn1 = getCache().createRegion(soloRegionName, factory2.create()); rgn1.put("soloKey0", "soloVal0_0"); rgn1.put("soloKey1", "soloVal1_0"); } catch (CacheException e) { fail("While creating region", e); } } };
public void run2() throws CacheException { Cache cache = getCache(); AttributesFactory attr = new AttributesFactory(); attr.setEarlyAck(true); attr.setPartitionAttributes(new PartitionAttributesFactory() .create()); RegionAttributes regionAttribs = attr.create(); Region partitionedregion = cache.createRegion(rName, regionAttribs); assertNotNull(partitionedregion); assertNotNull(cache.getRegion(rName)); } };
protected void createWithExpiration(String regionName, ExpirationAttributes ttl, ExpirationAttributes idle) throws CacheException { AttributesFactory factory = new AttributesFactory(); factory.setStatisticsEnabled(true); if (ttl != null) factory.setRegionTimeToLive(ttl); if (idle != null) factory.setRegionIdleTimeout(idle); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); RegionAttributes attrs = factory.create(); getLogWriter().info("4: " + regionName + " ttl action is " + ttl); getOrCreateRootRegion().createSubregion(regionName, attrs); }
public void run2() throws CacheException { Cache cache = getCache(); AttributesFactory attr = new AttributesFactory(); attr.setEarlyAck(true); PartitionAttributes prAttr = new PartitionAttributesFactory() .setLocalMaxMemory(0).create(); attr.setPartitionAttributes(prAttr); RegionAttributes regionAttribs = attr.create(); Region partitionedregion = cache.createRegion(rName, regionAttribs); assertNotNull(partitionedregion); assertNotNull(cache.getRegion(rName)); } };