internal void Delete(object key) { if (IsExist(key)) { OnlineStatic os = ((OnlineStatic)paramCache[key]); ManagerInfoBLL.UpdateState(new ManagerInfo { AdminID = os.Id, AdminMasterRight = masterRight.离线 }); paramCache.Remove(key); } }
public static void Create(string key, OnlineStatic value) { if (IsExist(key)) { CacheManager.Instance.Update(key, value); } else { CacheManager.Instance.Create(key, value); } }
internal static void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { ArrayList akeys = new ArrayList(paramCache.Keys); for (int i = 0; i < akeys.Count; i++) { if (((OnlineStatic)paramCache[akeys[i]]).IsLeave) { OnlineStatic os = ((OnlineStatic)paramCache[akeys[i]]); ManagerInfoBLL.UpdateState(new ManagerInfo { AdminID = os.Id, AdminMasterRight = masterRight.离线 }); paramCache.Remove(akeys[i]); } } }
public static void Update(string key, OnlineStatic value) { CacheManager.Instance.Update(key, value); }