IEventThrottler.cs 798 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Edge.Core.UniversalApi.CommunicationProvider
  5. {
  6. internal interface IEventThrottler
  7. {
  8. /// <summary>
  9. /// mute an event from a processor instance for a while, mostly used for limit the frequently firing events.
  10. /// </summary>
  11. /// <param name="processorMetaConfigName">used for identify a processor's instance</param>
  12. /// <param name="eventName"></param>
  13. /// <param name="eventBatchId">only the event data contains the batch id can support throttling</param>
  14. /// <param name="period">null for remove the throttle for target event</param>
  15. void Throttle(string processorMetaConfigName, string eventName, string eventBatchId, TimeSpan? period);
  16. }
  17. }