예제 #1
0
		internal virtual void Remove(CacheRecord record, CacheBase.RemoveExpectation removeExpectation)
		{
			Monitor.Enter(this);
			try
			{
				bool flag = this.cache.Remove(record.GetFuture());
				D.Assert(removeExpectation == CacheBase.RemoveExpectation.Unknown || removeExpectation == CacheBase.RemoveExpectation.Present == flag, "Remove didn't meet expectations. That could suggest a mutating hash.");
				this.resourceCounter.crement(-1);
				record.DropReference();
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
예제 #2
0
		internal override void Remove(CacheRecord record, CacheBase.RemoveExpectation removeExpectation)
		{
			base.Remove(record, removeExpectation);
		}
예제 #3
0
		public MemCachePrototype(CacheBase cache, IFuturePrototype prototype)
		{
			this.cache = cache;
			this.prototype = prototype;
		}
예제 #4
0
 public MemCacheFuture(CacheBase cache, IFuture future)
 {
     this.cache  = cache;
     this.future = future;
 }
예제 #5
0
		internal override void Remove(CacheRecord record, CacheBase.RemoveExpectation removeExpectation)
		{
			this.memoryUsed -= ((SizedCacheRecord)record).memoryCharge;
			this.lruQueue.Remove(record);
			base.Remove(record, removeExpectation);
		}
예제 #6
0
		public MemCacheFuture(CacheBase cache, IFuture future)
		{
			this.cache = cache;
			this.future = future;
		}
예제 #7
0
 public MemCachePrototype(CacheBase cache, IFuturePrototype prototype)
 {
     this.cache     = cache;
     this.prototype = prototype;
 }