/// <summary> /// Clear all the hashtables /// </summary> public void Clear() { lock (this) { ActiveStreams.Clear(); RunningSet.Clear(); RestartTimes.Clear(); AddedFlags.Clear(); } }
/// <summary> /// Store one cname as the current running set. /// Return false if the stream is not there. /// In case of a problem, leave the existing running set alone. /// </summary> /// <param name="cname"></param> /// <returns></returns> public bool ReplaceRunningSet(string cname) { lock (this) { if (ActiveStreams.ContainsKey(cname)) { RunningSet.Clear(); RunningSet.Add(cname, ActiveStreams[cname]); } else { return(false); } } return(true); }
/// <summary> /// Store the current checked items list in a new running set hash. /// Return false if one of the streams is gone. /// </summary> /// <param name="cnameList"></param> /// <returns></returns> public bool SnapshotRunningSet(ArrayList cnameList) { lock (this) { RunningSet.Clear(); foreach (String cname in cnameList) { if (ActiveStreams.ContainsKey(cname)) { RunningSet.Add(cname, ActiveStreams[cname]); } else { RunningSet.Clear(); return(false); } } } return(true); }
public void ClearRunningSet() { RunningSet.Clear(); }