Exemple #1
0
 private void onTimerImpl()
 {
     myNumToChurn = myChurnRate;
     while (myNumToChurn-- > 0)
     {
         myRandomNo = generator.Next(65536) % options.getSymbolListSize();
         //Accessing the mamda subscription object from the arrayList
         try
         {
             sub = (MamdaSubscription)subscriptionList[myRandomNo];
             subscriptionList.RemoveAt(myRandomNo);
             tempSymbol = sub.getSymbol();
             if (tempSymbol != null)
             {
                 //Deactivating the Mamda Subscription
                 sub.deactivate();
                 //Creating the MamdaSubscription
                 subscribeToBooks(tempSymbol);
                 ++myChurnStats;
             }
         }
         catch (Exception e)
         {
             Console.WriteLine("Error: {0}", e.ToString());
         }
     }
 }