// Token: 0x06000199 RID: 409 RVA: 0x00006654 File Offset: 0x00004854 internal void Remove(CacheEntryBase cacheEntry) { AnchorUtil.ThrowOnNullArgument(cacheEntry, "cacheEntry"); this.Context.Logger.Log(MigrationEventType.Warning, "Deactivating CacheEntry {0} ...", new object[] { cacheEntry }); cacheEntry.Deactivate(); lock (this.sharedDataLock) { this.cacheEntries.Remove(cacheEntry.ObjectId); } }
protected AnchorJobProcessorResult ShouldProcessEntry(CacheEntryBase cacheEntry) { if (base.StopEvent.WaitOne(0, false)) { return(AnchorJobProcessorResult.Waiting); } if (!cacheEntry.Validate()) { base.Context.Logger.Log(MigrationEventType.Information, "removing cache entry {0}. not validated", new object[] { cacheEntry }); return(AnchorJobProcessorResult.Deleted); } return(AnchorJobProcessorResult.Working); }
internal bool TryUpdate(CacheEntryBase cacheEntry, bool wakeCache) { AnchorUtil.ThrowOnNullArgument(cacheEntry, "cacheEntry"); bool flag = cacheEntry.Validate(); if (this.Contains(cacheEntry.ObjectId)) { if (!flag) { lock (this.sharedDataLock) { this.Context.Logger.Log(MigrationEventType.Warning, "Removing CacheEntry {0} because it's invalid ...", new object[] { cacheEntry }); this.cacheEntries.Remove(cacheEntry.ObjectId); goto IL_9E; } } this.Context.Logger.Log(MigrationEventType.Verbose, "CacheEntry {0} already exists in cache, skipping add", new object[] { cacheEntry }); return(true); } IL_9E: if (!flag) { return(false); } lock (this.sharedDataLock) { this.cacheEntries[cacheEntry.ObjectId] = cacheEntry; } if (wakeCache && this.Context.Config.GetConfig <bool>("ShouldWakeOnCacheUpdate")) { this.Context.Logger.Log(MigrationEventType.Information, "triggering cache update", new object[0]); this.cacheUpdated.Set(); } return(true); }