Esempio n. 1
0
        public void Add(long afterMSec, ScheduleHandle handle, long slot)
        {
            if (AuditPath.IsInfoEnabled)
            {
                StringWriter message = new StringWriter();
                message.Write("after ");
                message.Write(afterMSec);
                message.Write(" handle ");
                PrintHandle(message, handle);

                AuditPath.AuditLog(_engineUri, _statementName, AuditEnum.SCHEDULE, message.ToString());

                ModifyCreateProxy(handle);
            }
            _spi.Add(afterMSec, handle, slot);
        }
Esempio n. 2
0
 public void Transfer(ICollection<int> statementIds, SchedulingServiceSPI schedulingService)
 {
     var currentTime = Time;
     var targetTime = schedulingService.Time;
     
     foreach (var schedule in _timeHandleMap)
     {
         foreach (var entry in schedule.Value)
         {
             if (statementIds.Contains(entry.Value.StatementId))
             {
                 long relative = ScheduleTransferHelper.ComputeTransferTime(currentTime, targetTime, schedule.Key);
                 Remove(entry.Value, entry.Key);
                 schedulingService.Add(relative, entry.Value, entry.Key);
             }
         }
     }
 }