mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Refactor renamed ILock to IDistributedLock.
Also refactored the IDistributedLockService to be more in line with general .NET patterns by return a boolean from the TryAcquire method.
This commit is contained in:
@@ -13,10 +13,10 @@ using Orchard.Validation;
|
||||
namespace Orchard.TaskLease.Services {
|
||||
|
||||
/// <summary>
|
||||
/// Provides a database driven implementation of <see cref="ILock" />
|
||||
/// Provides a database driven implementation of <see cref="IDistributedLock" />
|
||||
/// </summary>
|
||||
[OrchardSuppressDependency("Orchard.Tasks.Locking.DefaultLock")]
|
||||
public class DatabaseLock : ILock {
|
||||
public class DatabaseLock : IDistributedLock {
|
||||
private readonly ILifetimeScope _lifetimeScope;
|
||||
private readonly IClock _clock;
|
||||
private string _name;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Orchard.TaskLease.Models;
|
||||
|
||||
namespace Orchard.TaskLease.Services {
|
||||
|
||||
@@ -7,7 +6,7 @@ namespace Orchard.TaskLease.Services {
|
||||
/// 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>
|
||||
[Obsolete("Use Orchard.Tasks.Locking.ILockService instead.")]
|
||||
[Obsolete("Use Orchard.Tasks.Locking.IDistributedLockService instead.")]
|
||||
public interface ITaskLeaseService : IDependency {
|
||||
|
||||
/// <summary>
|
||||
|
@@ -9,7 +9,7 @@ namespace Orchard.TaskLease.Services {
|
||||
/// <summary>
|
||||
/// Provides a database driven implementation of <see cref="ITaskLeaseService" />
|
||||
/// </summary>
|
||||
[Obsolete("Use Orchard.Tasks.Locking.ILockService instead.")]
|
||||
[Obsolete("Use Orchard.Tasks.Locking.DistributedLockService instead.")]
|
||||
public class TaskLeaseService : ITaskLeaseService {
|
||||
|
||||
private readonly IRepository<TaskLeaseRecord> _repository;
|
||||
|
Reference in New Issue
Block a user