private static bool ClearTrackTopicQueue(TopicViewCollection <TopicView> tvc) #endif { ProcessStats ps = new ProcessStats(tvc); ps.Enqueue(); return(true); }
static TopicStats() { queuedStatsList = null; queuedAllowCount = 20; if (GeneralConfigInfo.Current.TopicQueueStats == 1) { SetQueueCount(); } }
//public static int UpdateTopicViewCount(int tid, int viewcount) //{ // return DatabaseProvider.GetInstance().UpdateTopicViewCount(tid, viewcount); // //return BBX.Data.TopicStats.UpdateTopicViewCount(tid, viewcount); //} //public static bool TrackTopic(TopicView tv) //{ // return UpdateTopicViewCount(tv.TopicID, tv.ViewCount) == 1; //} public static void SetQueueCount() { if (GeneralConfigInfo.Current.TopicQueueStatsCount > 20 && GeneralConfigInfo.Current.TopicQueueStatsCount <= 1000) { queuedAllowCount = GeneralConfigInfo.Current.TopicQueueStatsCount; } if (queuedStatsList == null) { queuedStatsList = new TopicViewCollection <TopicView>(); } }
/// <summary> /// 追踪主题 /// </summary> /// <param name="tvc">主题浏览集合</param> /// <returns>成功返回true</returns> public static bool TrackTopic(TopicViewCollection <TopicView> tvc) { if (tvc == null) { return(false); } foreach (TopicView tv in tvc) { UpdateTopicViewCount(tv.TopicID, tv.ViewCount); } return(true); }
static bool TrackTopic(TopicViewCollection <TopicView> tvc) { if (tvc == null) { return(false); } foreach (var item in tvc) { //UpdateTopicViewCount(item.TopicID, item.ViewCount); Topic.UpdateViewCount(item.TopicID, item.ViewCount); } return(true); }
/// <summary> /// 设置队列长度 /// </summary> public static void SetQueueCount() { if (GeneralConfigs.GetConfig().TopicQueueStatsCount > 20 && GeneralConfigs.GetConfig().TopicQueueStatsCount <= 1000) { queuedAllowCount = GeneralConfigs.GetConfig().TopicQueueStatsCount; } if (queuedStatsList == null) { #if NET1 queuedStatsList = new TopicViewCollection(); #else queuedStatsList = new TopicViewCollection <TopicView>(); #endif } }
public ProcessStats(TopicViewCollection <TopicView> tvc) { _tvc = tvc; }
/// <summary> /// 清除追踪主题的队列 /// </summary> /// <param name="tvc">主题浏览集合</param> /// <returns>成功返回true</returns> private static bool ClearTrackTopicQueue(TopicViewCollection <TopicView> tvc) { new ProcessStats(tvc).Enqueue(); return(true); }
public ProcessStats(TopicViewCollection tvc)
/// <summary> /// 追踪主题 /// </summary> /// <param name="tvc">主题浏览集合</param> /// <returns>成功返回true</returns> #if NET1 public static bool TrackTopic(TopicViewCollection tvc)
/// <summary> /// 清除追踪主题的队列 /// </summary> /// <param name="tvc">主题浏览集合</param> /// <returns>成功返回true</returns> #if NET1 private static bool ClearTrackTopicQueue(TopicViewCollection tvc)