示例#1
0
        public void OnLoad(DurableTimerExtension timerExtension)
        {
            this.timerExtension = timerExtension;
            this.sortedTimerList.OnLoad();

            foreach (TimerData timerData in this.sortedTimerList.Timers)
            {
                timerData.IOThreadTimer = new IOThreadTimer(this.timerExtension.OnTimerFiredCallback, timerData.Bookmark, false, 0);
                if (timerData.ExpirationTime <= DateTime.UtcNow)
                {
                    // If the timer expired, we want to fire it immediately to win the ---- against UnloadOnIdle policy
                    timerExtension.OnTimerFiredCallback(timerData.Bookmark);
                }
                else
                {
                    timerData.IOThreadTimer.Set(timerData.ExpirationTime - DateTime.UtcNow);
                }
            }
        }
示例#2
0
 public void OnLoad(DurableTimerExtension timerExtension)
 {
     this.timers      = new Dictionary <Bookmark, TimerData>();
     this.activeTimer = new IOThreadTimer(timerExtension.OnTimerFiredCallback, null, false, 0);
     foreach (TimerData data in this.sortedTimerList.Timers)
     {
         this.timers.Add(data.Bookmark, data);
     }
     if (this.sortedTimerList.Count > 0)
     {
         TimerData data2 = this.sortedTimerList.First();
         if (data2.ExpirationTime <= DateTime.UtcNow)
         {
             timerExtension.OnTimerFiredCallback(data2.Bookmark);
         }
         else
         {
             this.activeTimer.Set((TimeSpan)(data2.ExpirationTime - DateTime.UtcNow));
         }
     }
 }
 public TimerPersistenceParticipant(DurableTimerExtension timerExtension)
     : base(false, false)
 {
     this.defaultTimerExtension = timerExtension;
 }
 public BookmarkResumptionState(Bookmark timerBookmark, DurableTimerExtension timerExtension, WorkflowInstanceProxy instance)
 {
     this.TimerBookmark  = timerBookmark;
     this.TimerExtension = timerExtension;
     this.Instance       = instance;
 }
示例#5
0
 public TimerTable(DurableTimerExtension timerExtension)
 {
     _sortedTimerList = new SortedTimerList();
     _timerExtension  = timerExtension;
 }
示例#6
0
 public TimerTable(DurableTimerExtension timerExtension)
 {
     this.activeTimer = new IOThreadTimer(timerExtension.OnTimerFiredCallback, null, false, 0);
 }
 public TimerPersistenceParticipant(DurableTimerExtension timerExtension) : base(false, false)
 {
     this.defaultTimerExtension = timerExtension;
 }
 public BookmarkResumptionState(Bookmark timerBookmark, DurableTimerExtension timerExtension, WorkflowInstanceProxy instance)
 {
     this.TimerBookmark = timerBookmark;
     this.TimerExtension = timerExtension;
     this.Instance = instance;
 }
示例#9
0
 public TimerTable(DurableTimerExtension timerExtension)
 {
     this.sortedTimerList = new SortedTimerList();
     this.timerExtension  = timerExtension;
 }