添加项目文件。
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RedisHelper
|
||||
{
|
||||
public interface IDistributedLock
|
||||
{
|
||||
Task<T> TryExecuteAsync<T>(string key, Func<Task<T>> action, int expiry = 30, bool retry = false, int retryDelay = 100);
|
||||
|
||||
Task<bool> TryExecuteAsync(string key, Func<Task> action, int expiry = 30, bool retry = false, int retryDelay = 100);
|
||||
|
||||
T TryExecute<T>(string key, Func<T> action, int expiry = 30, bool retry = false, int retryDelay = 100);
|
||||
|
||||
bool TryExecute(string key, Action action, int expiry = 30, bool retry = false, int retryDelay = 100);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user