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 RegionThreeLoadEntries(int num) { AttributesFactory af = new AttributesFactory(); af.SetScope(ScopeType.Local); af.SetCacheLoader(m_ldr); m_region = CacheHelper.CreateRegion(TestRegion, af.CreateRegionAttributes()); m_ldr.Reset(); Thread.Sleep(100); DoGets(m_region, num); Assert.AreEqual(num, m_ldr.Loads); IGFSerializable[] arr = m_region.GetKeys(); Assert.AreEqual(num, arr.Length); }
protected virtual void SetCallbacks(AttributesFactory attributesFactory) { if (cacheListener != null) { foreach (ICacheListener listener in cacheListener) { attributesFactory.SetCacheListener(listener); } } if (cacheLoader != null) { attributesFactory.SetCacheLoader(cacheLoader); } if (cacheWriter != null) { attributesFactory.SetCacheWriter(cacheWriter); } }