/// <summary> /// Updates a collection cache with a given cache Id. /// </summary> /// <param name="cacheId"></param> /// <param name="cache"></param> public void SetCache(string cacheId, ICollectionCache cache) { //lock (_locker) //{ // _collectionCachePool.Add(cacheId, cache); //} }
private void ReuseCacheFromPool() { // todo: include InstanceId to the cacheId... string cacheId = string.Format("{0}{1}", File.Filename, GetId()); ICollectionCache cache = CachePoolManager.GetCache(cacheId); if (cache == null) { CachePoolManager.SetCache(cacheId, this); } else { MruManager = cache.MruManager; Blocks = cache.Blocks; MruManager.SetDataStores(this, DataBlockDriver); } }
private IBaseData InsertBaseData(ICollectionCache cache) { var inserter = new BaseDataInserter(cache, _context); inserter.ProgressMaxChanged += OnProgressMaxChanged; inserter.ProgressValueChanged += OnProgressValueChanged; inserter.Feedback += OnFeedback; try { inserter.Insert(); } finally { inserter.ProgressMaxChanged -= OnProgressMaxChanged; inserter.ProgressValueChanged -= OnProgressValueChanged; inserter.Feedback -= OnFeedback; } return(inserter); }
public DIService(ICollectionCache collectionCache) { this._collectionCache = collectionCache; }
public BaseDataInserter(ICollectionCache cache, Entity.CollectionEntities context) { _cache = cache; _context = context; }