예제 #1
0
 void OnDomainUnload(object sender, EventArgs e)
 {
     try
     {
         var buckets = filler.CheckoutBuckets();
         repository.Save(buckets);
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
 }
예제 #2
0
        public override void Execute()
        {
            var now = Utility.CurrentTime();

            if (LastExecuted.HasValue)
            {
                if (LastExecuted.Value.GetSlot(MemoryFlushInterval) != now.GetSlot(MemoryFlushInterval))
                {
                    var buckets = filler.CheckoutBuckets();
                    repository.Save(buckets);
                }
            }

            if (!LastExecuted.HasValue || LastExecuted.Value.GetSlot(TransferInterval) != now.GetSlot(TransferInterval))
            {
                repository.Transfer(now, StatisticsGranularity);
            }
        }