wanshenmean
8 天以前 fd18eaba5e1c086a588509371f91310e7aafff9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace WIDESEAWCS_RedisService.DelayQueue
{
    public interface IDelayQueueService
    {
        /// <summary>
        /// 添加延迟任务
        /// </summary>
        bool Enqueue(string queueName, string message, TimeSpan delay);
 
        /// <summary>
        /// 获取到期的任务
        /// </summary>
        List<string> DequeueDue(string queueName, int count = 10);
 
        /// <summary>
        /// 移除任务
        /// </summary>
        bool Remove(string queueName, string message);
 
        /// <summary>
        /// 获取队列长度
        /// </summary>
        long GetQueueLength(string queueName);
    }
}