public void AfterPropertiesSet() { if (cachingEnabled != null) { attributesFactory.SetCachingEnabled(cachingEnabled.Value); } if (clientNotificationEnabled != null) { attributesFactory.SetClientNotificationEnabled(clientNotificationEnabled.Value); } if (lruEntriesLimit != null) { attributesFactory.SetLruEntriesLimit(lruEntriesLimit.Value); } if (cloningEnabled != null) { attributesFactory.SetCloningEnabled(cloningEnabled.Value); } SetStorageProperties(attributesFactory); SetExpirationProperties(attributesFactory); gemfireRegionAttributes = attributesFactory.CreateRegionAttributes(); }
public void CreateRegionWithTallyLoader(ScopeType scope) { AttributesFactory af = new AttributesFactory(); af.SetCacheLoader(m_ldr); af.SetScope(scope); af.SetCachingEnabled(true); m_region = CacheHelper.CreateRegion(TestRegion, af.CreateRegionAttributes()); }
public void CreateRegionWithTallyWriter(ScopeType scope) { AttributesFactory af = new AttributesFactory(); af.SetCacheWriter(m_lwr); af.SetScope(scope); af.SetCachingEnabled(true); m_netWriteRegion = CacheHelper.CreateRegion(TestRegionWrite, af.CreateRegionAttributes()); }
private Region CreateRegion() { DistributedSystem dsys = DistributedSystem.Connect("exampleregion"); Cache cache = CacheFactory.Create("exampleregion", dsys); AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.SetScope(ScopeType.Local); attributesFactory.SetCachingEnabled(true); RegionAttributes regionAttributes = attributesFactory.CreateRegionAttributes(); return cache.CreateRegion("exampleregion", regionAttributes); }
private Region CreateRegion() { DistributedSystem dsys = DistributedSystem.Connect("exampleregion"); Cache cache = CacheFactory.Create("exampleregion", dsys); AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.SetScope(ScopeType.Local); attributesFactory.SetCachingEnabled(true); RegionAttributes regionAttributes = attributesFactory.CreateRegionAttributes(); return(cache.CreateRegion("exampleregion", regionAttributes)); }
public void RegionLookup() { Cache cache = (Cache) ctx["gemfire-cache"]; AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.SetScope(ScopeType.Local); attributesFactory.SetCachingEnabled(true); RegionAttributes regionAttributes = attributesFactory.CreateRegionAttributes(); Region existing = cache.CreateRegion("existing", regionAttributes); Assert.IsTrue(ctx.ContainsObject("lookup")); RegionLookupFactoryObject regionLookupFactoryObject = (RegionLookupFactoryObject)ctx.GetObject("&lookup"); Assert.AreEqual("existing", TestUtils.ReadField<string>("name", regionLookupFactoryObject)); //TODO SGFNET-20: existing is not registered as an alias with lookup/. //Assert.AreEqual(ctx.GetObject("existing"), ctx.GetObject("lookup")); }
public void RegionLookup() { Cache cache = (Cache)ctx["gemfire-cache"]; AttributesFactory attributesFactory = new AttributesFactory(); attributesFactory.SetScope(ScopeType.Local); attributesFactory.SetCachingEnabled(true); RegionAttributes regionAttributes = attributesFactory.CreateRegionAttributes(); Region existing = cache.CreateRegion("existing", regionAttributes); Assert.IsTrue(ctx.ContainsObject("lookup")); RegionLookupFactoryObject regionLookupFactoryObject = (RegionLookupFactoryObject)ctx.GetObject("&lookup"); Assert.AreEqual("existing", TestUtils.ReadField <string>("name", regionLookupFactoryObject)); //TODO SGFNET-20: existing is not registered as an alias with lookup/. //Assert.AreEqual(ctx.GetObject("existing"), ctx.GetObject("lookup")); }