Esempio n. 1
0
 internal override void TouchAfterUnlocked(CacheRecord record, bool recordIsNew)
 {
     if (recordIsNew)
     {
         this.NotifyObservers(record.GetFuture(), true);
     }
 }
Esempio n. 2
0
		internal override void TouchAfterUnlocked(CacheRecord record, bool recordIsNew)
		{
			if (recordIsNew)
			{
				this.NotifyObservers(record.GetFuture(), true);
			}
		}
Esempio n. 3
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);
			}
		}
Esempio n. 4
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);
     }
 }