Пример #1
0
        /// <summary>
        /// Overloaded constructor. Takes the properties as a map.
        /// </summary>
        /// <param name="cacheSchemes">collection of cache schemes (config properties).</param>
        /// <param name="properties">properties collection for this cache.</param>
        /// <param name="listener">cache events listener</param>
        /// <param name="timeSched">scheduler to use for periodic tasks</param>
        public IndexedLocalCache(IDictionary cacheClasses, CacheBase parentCache, IDictionary properties, ICacheEventsListener listener, CacheRuntimeContext context)
            : base(cacheClasses, parentCache, properties, listener, context)
        {
            IDictionary props = null;
            if (properties.Contains("indexes"))
            {
                props = properties["indexes"] as IDictionary;
            }

            _queryIndexManager = new QueryIndexManager(props, this, _context.CacheRoot.Name);
            if (!_queryIndexManager.Initialize()) _queryIndexManager = null;


            //+Numan16122014
            _cacheStore.ISizableQueryIndexManager = _queryIndexManager;            
            _cacheStore.ISizableEvictionIndexManager = _evictionPolicy;
            _cacheStore.ISizableExpirationIndexManager = _context.ExpiryMgr;

            _stats.MaxCount = _cacheStore.MaxCount;
            _stats.MaxSize = _cacheStore.MaxSize;

            //+Numan16122014

            if (_context.PerfStatsColl != null)
            {
                if (_queryIndexManager != null)
                    _context.PerfStatsColl.SetQueryIndexSize(_queryIndexManager.IndexInMemorySize);                
            }
        }
Пример #2
0
 public IndexAddTask(QueryIndexManager indexManager, object key, CacheEntry value, OperationContext operationContext)
 {
     _key              = key;
     _entry            = value;
     _indexManager     = indexManager;
     _operationContext = operationContext;
 }
Пример #3
0
 public IndexAddTask(QueryIndexManager indexManager, object key, CacheEntry value, OperationContext operationContext)
 {
     _key = key;
     _entry = value;
     _indexManager = indexManager;
     _operationContext = operationContext;
 }
Пример #4
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or 
 /// resetting unmanaged resources.
 /// </summary>
 public override void Dispose()
 {
     base.Dispose();
     if (_queryIndexManager != null)
     {
         _queryIndexManager.Dispose();
         _queryIndexManager = null;
     }
 }
Пример #5
0
 public IndexRemoveTask(QueryIndexManager indexManager, object key, CacheEntry value)
 {
     _key          = key;
     _entry        = value;
     _indexManager = indexManager;
 }
Пример #6
0
 public IndexRemoveTask(QueryIndexManager indexManager, object key, CacheEntry value)
 {
     _key = key;
     _entry = value;
     _indexManager = indexManager;
 }