39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace MyCode.Project.Services
|
|||
|
|
{
|
|||
|
|
public interface IQueueProcessService
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 添加队列
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="methodName">方法名</param>
|
|||
|
|
/// <param name="entity">参数信息</param>
|
|||
|
|
void AddQueue<T>(string methodName, DateTime? expireTime, object entity = null);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Execute(队列执行)
|
|||
|
|
/// </summary>
|
|||
|
|
|
|||
|
|
void Execute();
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 添加队列
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="type">执行类</param>
|
|||
|
|
/// <param name="methodName">方法名</param>
|
|||
|
|
/// <param name="entity">参数信息</param>
|
|||
|
|
void AddQueue(Type type, string methodName, DateTime? expireTime, object entity = null);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 返回队列长度
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
long GetLen();
|
|||
|
|
}
|
|||
|
|
}
|