using System; using System.Threading.Tasks; namespace ZeroLevel.Services.Shedulling { public interface IExpirationAsyncSheduller : IDisposable { /// /// Adding a task with the time after which it should be completed /// long Push(TimeSpan timespan, Func callback); /// /// Adding a task with the date / time when it should be executed /// long Push(DateTime date, Func callback); /// /// Delete task by ID /// /// Task ID bool Remove(long key); /// /// Cleaning the scheduler /// void Clean(); /// /// Pausing the scheduler (does not prevent the addition of new tasks) /// void Pause(); /// /// Resumption of work scheduler /// void Resume(); } }