You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
375 B
14 lines
375 B
namespace Common.Documents;
|
|
public interface IDocumentLocker<TDocument, TPrimaryKey> : IDisposable
|
|
where TDocument : IDocument<TPrimaryKey>
|
|
where TPrimaryKey : notnull
|
|
{
|
|
event EventHandler? Expired;
|
|
Guid Key { get; }
|
|
TimeSpan LockTimeout { get; set; }
|
|
TimeSpan Timeout { get; set; }
|
|
TimeSpan Lifetime { get; set; }
|
|
Task Lock(TDocument document);
|
|
Task Unlock();
|
|
}
|