IHoldLock.cs
313 Bytes
using System.Threading.Tasks;
using Orleans;
namespace Pole.Core.Services
{
public interface IHoldLock : IGrainWithStringKey
{
Task<(bool isOk, long lockId)> Lock(int holdingSeconds =30);
Task<bool> Hold(long lockId, int holdingSeconds = 30);
Task Unlock(long lockId);
}
}