public override void Dispose() { if (CacheId != 0) { FirstLevelCacheExtendable.UnregisterFirstLevelCache(this, CacheFactoryDirective.NoDCE, false, Name); } CacheModification = null; CachePathHelper = null; EntityFactory = null; FirstLevelCacheExtendable = null; GarbageProxyFactory = null; Log = null; Parent = null; keyToAlternateIdsMap = null; SecurityActivation = null; base.Dispose(); }
protected IDisposableCache CreateIntern(CacheFactoryDirective cacheFactoryDirective, bool privileged, bool foreignThreadAware, bool?useWeakEntries, String name) { IBeanRuntime <ChildCache> firstLevelCacheBC = BeanContext.RegisterBean <ChildCache>(); if (!foreignThreadAware) { // Do not inject EventQueue because caches without foreign interest will never receive async DCEs firstLevelCacheBC.IgnoreProperties("EventQueue"); } if (useWeakEntries.HasValue) { firstLevelCacheBC.PropertyValue("WeakEntries", useWeakEntries.Value); } if (name != null) { firstLevelCacheBC.PropertyValue("Name", name); } firstLevelCacheBC.PropertyValue("Privileged", privileged); ChildCache firstLevelCache = firstLevelCacheBC.Finish(); FirstLevelCacheExtendable.RegisterFirstLevelCache(firstLevelCache, cacheFactoryDirective, foreignThreadAware, name); return(firstLevelCache); }