src/Orchard.Web/Modules/Orchard.TaskLease/Services/ITaskLeaseService.cs
(完整代码) 1KBusing System;
using Orchard.TaskLease.Models;
namespace Orchard.TaskLease.Services
{
/// <summary>
/// Describes a service to save and acquire task leases. A task lease can't be acquired by two different machines,
/// for a specific amount of time. Optionnally a State can be saved along with the lease.
/// </summary>
public interface ITaskLeaseService : IDependency
{
/// <summary>
/// Acquires a lease for the specified task name, and amount of time.
/// </summary>
/// <returns>The state of the lease if it was acquired, otherwise <c>null</c>.</returns>
string Acquire(string taskName, DateTime expiredUtc);
/// <summary>
/// Updates a lease for the current machine if it exists
/// </summary>
void Update(string taskName, string state);
/// <summary>
/// Updates a lease for the current machine if it exists
/// </summary>
void Update(string taskName, string state, DateTime expiredUtc);
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
