Example #1
0
 /// <summary>
 /// Clear all the hashtables
 /// </summary>
 public void Clear()
 {
     lock (this)
     {
         ActiveStreams.Clear();
         RunningSet.Clear();
         RestartTimes.Clear();
         AddedFlags.Clear();
     }
 }
Example #2
0
 /// <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);
 }
Example #3
0
 /// <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);
 }
Example #4
0
 public void ClearRunningSet()
 {
     RunningSet.Clear();
 }