From 1c8df11376e04d5a8465dcd766ee90583b84c33d Mon Sep 17 00:00:00 2001 From: Michael Adelson Date: Sun, 7 Aug 2022 09:10:34 -0400 Subject: [PATCH 1/3] Try out default docs --- .gitignore | 2 ++ DefaultDocumentation.json | 7 ++++ .../DistributedLock.Core.csproj | 10 +++++- .../DistributedLock.WaitHandles.csproj | 8 +++++ docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md | 22 ++++++++++++ docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md | 9 +++++ docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md | 14 ++++++++ docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md | 11 ++++++ docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md | 27 ++++++++++++++ docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md | 31 ++++++++++++++++ docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md | 14 ++++++++ docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md | 14 ++++++++ docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md | 29 +++++++++++++++ docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md | 36 +++++++++++++++++++ docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md | 25 +++++++++++++ docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md | 14 ++++++++ docs/apiReference/TGomeSLpasysM1hnh_3gqw.md | 11 ++++++ docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md | 25 +++++++++++++ docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md | 21 +++++++++++ docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md | 14 ++++++++ docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md | 36 +++++++++++++++++++ docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md | 36 +++++++++++++++++++ docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md | 14 ++++++++ docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md | 36 +++++++++++++++++++ docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md | 36 +++++++++++++++++++ docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md | 27 ++++++++++++++ docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md | 36 +++++++++++++++++++ docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md | 14 ++++++++ docs/apiReference/u++QKv1+Gje9fkJlbjceow.md | 30 ++++++++++++++++ docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md | 36 +++++++++++++++++++ docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md | 36 +++++++++++++++++++ 31 files changed, 680 insertions(+), 1 deletion(-) create mode 100644 DefaultDocumentation.json create mode 100644 docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md create mode 100644 docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md create mode 100644 docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md create mode 100644 docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md create mode 100644 docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md create mode 100644 docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md create mode 100644 docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md create mode 100644 docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md create mode 100644 docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md create mode 100644 docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md create mode 100644 docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md create mode 100644 docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md create mode 100644 docs/apiReference/TGomeSLpasysM1hnh_3gqw.md create mode 100644 docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md create mode 100644 docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md create mode 100644 docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md create mode 100644 docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md create mode 100644 docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md create mode 100644 docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md create mode 100644 docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md create mode 100644 docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md create mode 100644 docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md create mode 100644 docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md create mode 100644 docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md create mode 100644 docs/apiReference/u++QKv1+Gje9fkJlbjceow.md create mode 100644 docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md create mode 100644 docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md diff --git a/.gitignore b/.gitignore index d4b26077..7e8d6cb6 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ StyleCop.Cache packages/ credentials/ + +publish/ \ No newline at end of file diff --git a/DefaultDocumentation.json b/DefaultDocumentation.json new file mode 100644 index 00000000..1bd71e3d --- /dev/null +++ b/DefaultDocumentation.json @@ -0,0 +1,7 @@ +{ + "OutputDirectoryPath": "docs/apiReference", + "GeneratedAccessModifiers": "Public,Protected,ProtectedInternal", + "ExternLinksFilePaths": ["publish/apiReference/*.links..txt"], + "FileNameFactory": "Md5", + "LogLevel": "Trace" +} \ No newline at end of file diff --git a/DistributedLock.Core/DistributedLock.Core.csproj b/DistributedLock.Core/DistributedLock.Core.csproj index 2bb6ba2d..604eca39 100644 --- a/DistributedLock.Core/DistributedLock.Core.csproj +++ b/DistributedLock.Core/DistributedLock.Core.csproj @@ -52,8 +52,16 @@ - + + + + ..\DefaultDocumentation.json + ..\publish\apiReference\$(AssemblyName).links.txt + + + + \ No newline at end of file diff --git a/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj b/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj index 508bd1bd..7a42313e 100644 --- a/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj +++ b/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj @@ -54,4 +54,12 @@ + + + ..\DefaultDocumentation.json + ..\publish\apiReference\$(AssemblyName).links.txt + + + + \ No newline at end of file diff --git a/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md b/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md new file mode 100644 index 00000000..49a9d61c --- /dev/null +++ b/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md @@ -0,0 +1,22 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool) Method + +Creates a [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless +[exactName](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. + +```csharp +public Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock CreateLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') \ No newline at end of file diff --git a/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md b/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md new file mode 100644 index 00000000..9eb996ed --- /dev/null +++ b/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md @@ -0,0 +1,9 @@ +## Medallion.Threading.WaitHandles Namespace + +| Classes | | +| :--- | :--- | +| [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') | A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. | +| [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') | Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') | Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') | +| [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') | Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') | Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock')
and [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). | diff --git a/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md b/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md new file mode 100644 index 00000000..68bb5f30 --- /dev/null +++ b/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.Name Property + +Implements [Medallion.Threading.IDistributedLock.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md b/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md new file mode 100644 index 00000000..0f6b0589 --- /dev/null +++ b/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md @@ -0,0 +1,11 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') + +## WaitHandleDistributedSemaphoreHandle.Dispose() Method + +Releases the semaphore ticket + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md b/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md new file mode 100644 index 00000000..17eaa78f --- /dev/null +++ b/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md @@ -0,0 +1,27 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock(string, Nullable, bool) Constructor + +Constructs a lock with the given [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). + +[abandonmentCheckCadence](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by +its original owner. The default is 2s. + +Unless [exactName](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public EventWaitHandleDistributedLock(string name, System.Nullable abandonmentCheckCadence=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md b/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md new file mode 100644 index 00000000..f74097d5 --- /dev/null +++ b/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md @@ -0,0 +1,31 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore(string, int, Nullable, bool) Constructor + +Constructs a lock with the given [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). + +[abandonmentCheckCadence](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by +its original owner. The default is 2s. + +Unless [exactName](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public WaitHandleDistributedSemaphore(string name, int maxCount, System.Nullable abandonmentCheckCadence=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md b/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md new file mode 100644 index 00000000..6f1cac35 --- /dev/null +++ b/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.Name Property + +Implements [Medallion.Threading.IDistributedSemaphore.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md b/docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md new file mode 100644 index 00000000..d5bc4079 --- /dev/null +++ b/docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') + +## WaitHandleDistributedSemaphoreHandle.DisposeAsync() Method + +Releases the semaphore ticket + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md b/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md new file mode 100644 index 00000000..2a113707 --- /dev/null +++ b/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md @@ -0,0 +1,29 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') + +## EventWaitHandleDistributedLock Class + +A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. + +```csharp +public sealed class EventWaitHandleDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLock + +Implements [Medallion.Threading.IDistributedLock](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [EventWaitHandleDistributedLock(string, Nullable<TimeSpan>, bool)](2Tva732RJcbYY7yOGc2Dtg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool)') | Constructs a lock with the given [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name').

[abandonmentCheckCadence](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](0dCx0_H_hZmWHCpWnBDJvg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Name') | Implements [Medallion.Threading.IDistributedLock.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](csc50wjfYFMfhVMh9f0p5g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](Q_XRVgkI_77ehHSwgz3+6g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](uJMovE7EIAyUhcQlWkoiMg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](bF7Wpky_IL0puVDTMR7U2w.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md b/docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md new file mode 100644 index 00000000..32424f34 --- /dev/null +++ b/docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.AcquireAsync#Medallion_Threading_IDistributedLock_AcquireAsync_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md b/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md new file mode 100644 index 00000000..0bf32e8c --- /dev/null +++ b/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md @@ -0,0 +1,25 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSemaphoreHandle Class + +Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class WaitHandleDistributedSemaphoreHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphoreHandle + +Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](T+UrsDheZiy67KGBnvRJ2w.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.HandleLostToken') | Implements [Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](0x7_KsBHsL2asMDmCVsGJw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.Dispose()') | Releases the semaphore ticket | +| [DisposeAsync()](GYxpHZnJiw9JgevQ9jPjWg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.DisposeAsync()') | Releases the semaphore ticket | diff --git a/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md b/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md new file mode 100644 index 00000000..0fcc6ef8 --- /dev/null +++ b/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') + +## WaitHandleDistributedSemaphoreHandle.HandleLostToken Property + +Implements [Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md b/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md new file mode 100644 index 00000000..0a6582a1 --- /dev/null +++ b/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md @@ -0,0 +1,11 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') + +## EventWaitHandleDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md b/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md new file mode 100644 index 00000000..ec046de8 --- /dev/null +++ b/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md @@ -0,0 +1,25 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSynchronizationProvider Class + +Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +and [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). + +```csharp +public sealed class WaitHandleDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedSemaphoreProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSynchronizationProvider + +Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider'), [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') + +| Constructors | | +| :--- | :--- | +| [WaitHandleDistributedSynchronizationProvider(Nullable<TimeSpan>)](e6xRwWsJppw_KT0BMNM9Fg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable)') | Constructs a [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](e6xRwWsJppw_KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string, bool)](+f5b_NJBO_BPj27n2I4gbA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless
[exactName](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | +| [CreateSemaphore(string, int, bool)](lScE6Nm5quO4w5D+oiHGrA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool)') | Creates a [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name')
and [maxCount](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait
handle names will be escaped/hashed. | diff --git a/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md b/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md new file mode 100644 index 00000000..8a86c0f4 --- /dev/null +++ b/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md @@ -0,0 +1,21 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') + +## EventWaitHandleDistributedLockHandle Class + +Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class EventWaitHandleDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLockHandle + +Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Methods | | +| :--- | :--- | +| [Dispose()](TGomeSLpasysM1hnh_3gqw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](rAn7UJB4AMy2LlyftHh0jQ.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md b/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md new file mode 100644 index 00000000..13f95abe --- /dev/null +++ b/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.MaxCount Property + +Implements [Medallion.Threading.IDistributedSemaphore.MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +```csharp +public int MaxCount { get; } +``` + +Implements [MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md b/docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md new file mode 100644 index 00000000..80c6b642 --- /dev/null +++ b/docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.TryAcquireAsync#Medallion_Threading_IDistributedLock_TryAcquireAsync_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md b/docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md new file mode 100644 index 00000000..71c3b25e --- /dev/null +++ b/docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Acquire#Medallion_Threading_IDistributedLock_Acquire_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') +An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md b/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md new file mode 100644 index 00000000..a7957743 --- /dev/null +++ b/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider(Nullable) Constructor + +Constructs a [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](e6xRwWsJppw_KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). + +```csharp +public WaitHandleDistributedSynchronizationProvider(System.Nullable abandonmentCheckCadence=null); +``` +#### Parameters + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') \ No newline at end of file diff --git a/docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md b/docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md new file mode 100644 index 00000000..4057b732 --- /dev/null +++ b/docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.Acquire(Nullable, CancellationToken) Method + +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Acquire#Medallion_Threading_IDistributedSemaphore_Acquire_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') +A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md b/docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md new file mode 100644 index 00000000..bd203fb0 --- /dev/null +++ b/docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method + +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.AcquireAsync#Medallion_Threading_IDistributedSemaphore_AcquireAsync_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md b/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md new file mode 100644 index 00000000..10349146 --- /dev/null +++ b/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md @@ -0,0 +1,27 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool) Method + +Creates a [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') +and [maxCount](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait +handle names will be escaped/hashed. + +```csharp +public Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore CreateSemaphore(string name, int maxCount, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') \ No newline at end of file diff --git a/docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md b/docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md new file mode 100644 index 00000000..82c534e1 --- /dev/null +++ b/docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.TryAcquireAsync#Medallion_Threading_IDistributedSemaphore_TryAcquireAsync_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md b/docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md new file mode 100644 index 00000000..83ef7d9c --- /dev/null +++ b/docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md @@ -0,0 +1,14 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') + +## EventWaitHandleDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md b/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md new file mode 100644 index 00000000..ee208a0d --- /dev/null +++ b/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md @@ -0,0 +1,30 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSemaphore Class + +Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') + +```csharp +public sealed class WaitHandleDistributedSemaphore : +Medallion.Threading.IDistributedSemaphore +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphore + +Implements [Medallion.Threading.IDistributedSemaphore](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore 'Medallion.Threading.IDistributedSemaphore') + +| Constructors | | +| :--- | :--- | +| [WaitHandleDistributedSemaphore(string, int, Nullable<TimeSpan>, bool)](4ysEtsHFYQ8UNvnVKspCjg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool)') | Constructs a lock with the given [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name').

[abandonmentCheckCadence](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [MaxCount](_eKAd9KmIbGvBAAhA9RhEw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.MaxCount') | Implements [Medallion.Threading.IDistributedSemaphore.MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') | +| [Name](DrkUdCA1HTHqv41YDxrv5w.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Name') | Implements [Medallion.Threading.IDistributedSemaphore.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](fanbWVO3U0ELSV89GyikgQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](k9Mv6k_1m4DGGHNWVI0rSw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](xAXKRX1HdsJVylWBC_+WmA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](nk6f9CuMtAPqAG7F0UWvSA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | diff --git a/docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md b/docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md new file mode 100644 index 00000000..f93cbd56 --- /dev/null +++ b/docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.TryAcquire#Medallion_Threading_IDistributedLock_TryAcquire_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') +An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md b/docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md new file mode 100644 index 00000000..07322bd6 --- /dev/null +++ b/docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md @@ -0,0 +1,36 @@ +### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.TryAcquire#Medallion_Threading_IDistributedSemaphore_TryAcquire_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') +A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file From e17b6560ee409d3b1f5478063575aa97fad85a6e Mon Sep 17 00:00:00 2001 From: Michael Adelson Date: Sun, 7 Aug 2022 13:36:01 -0400 Subject: [PATCH 2/3] Scripted documentation generation in unit test --- DefaultDocumentation.json | 7 -- .../DistributedLock.Core.csproj | 10 +- .../DistributedLock.WaitHandles.csproj | 8 -- DistributedLockCodeGen/ApiDocGenerator.cs | 106 ++++++++++++++++++ .../DistributedLockCodeGen.csproj | 4 +- ...ibutedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md | 23 ++++ .../p7LTz4wSm4vPWGg.md | 19 ++++ ...utedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md | 37 ++++++ ...ock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md | 37 ++++++ .../AzureBlobLeaseDistributedLock.Name.md | 15 +++ .../Ri/nDJA.md | 37 ++++++ ....TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md | 37 ++++++ .../AzureBlobLeaseDistributedLock.md | 31 +++++ ...lobLeaseDistributedLockHandle.Dispose().md | 12 ++ ...aseDistributedLockHandle.DisposeAsync().md | 15 +++ ...seDistributedLockHandle.HandleLostToken.md | 15 +++ ...eBlobLeaseDistributedLockHandle.LeaseId.md | 13 +++ .../AzureBlobLeaseDistributedLockHandle.md | 27 +++++ ...onProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md | 19 ++++ ...vider.CreateLock.I34EpC7k9lisV6FiK0xunw.md | 20 ++++ ...LeaseDistributedSynchronizationProvider.md | 23 ++++ ...usyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md | 31 +++++ .../g.md | 27 +++++ .../x+hnazpWWqAWeDDlrJmTg.md | 24 ++++ .../AzureBlobLeaseOptionsBuilder.md | 18 +++ .../Medallion.Threading.Azure.md | 10 ++ docs/api/DistributedLock.Azure/README.md | 7 ++ ...kException..ctor.7kv3RcT81RlRFP35V3Vh0w.md | 19 ++++ ...kException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md | 15 +++ .../DeadlockException.DeadlockException().md | 10 ++ .../DistributedLock.Core/DeadlockException.md | 19 ++++ ...ions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md | 31 +++++ .../q+uAX8BwEjg.md | 31 +++++ ...s.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md | 31 +++++ ...AcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md | 31 +++++ .../DistributedLockProviderExtensions.md | 19 ++++ ....AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md | 31 +++++ ...ireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md | 31 +++++ ...AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md | 31 +++++ .../Vet3jdKQ.md | 31 +++++ ...yAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md | 31 +++++ ...ireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md | 31 +++++ ...AcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md | 31 +++++ ...reWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md | 31 +++++ ...butedReaderWriterLockProviderExtensions.md | 23 ++++ ...AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md | 35 ++++++ .../gXNLgnKQ.md | 35 ++++++ .../urIfHteJZkfKKtFB7A.md | 35 ++++++ ...reSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md | 35 ++++++ .../DistributedSemaphoreProviderExtensions.md | 19 ++++ .../PekFHw.md | 31 +++++ ...bleReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md | 31 +++++ .../lygC7zTxR2A.md | 31 +++++ ...bleReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md | 31 +++++ ...eableReaderWriterLockProviderExtensions.md | 19 ++++ ...utedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md | 35 ++++++ ...ock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md | 35 ++++++ .../IDistributedLock.Name.md | 13 +++ ...dLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md | 35 ++++++ ....TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md | 35 ++++++ .../DistributedLock.Core/IDistributedLock.md | 22 ++++ ...vider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md | 18 +++ .../IDistributedLockProvider.md | 15 +++ .../tM1emIKPQTMhyxJaEVg.md | 22 ++++ .../ZfUBdRwlMtX9ctB9dtg.md | 22 ++++ ...gradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md | 19 ++++ .../VtyA3b0uF1JN1kg.md | 22 ++++ .../IDistributedLockUpgradeableHandle.md | 22 ++++ ....AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md | 35 ++++++ ...ireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md | 35 ++++++ ...AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md | 35 ++++++ ...reWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md | 35 ++++++ .../IDistributedReaderWriterLock.Name.md | 13 +++ ...yAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md | 35 ++++++ .../fKwnr3rNQ.md | 35 ++++++ ...AcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md | 35 ++++++ ...reWriteLockAsync.yhTsitSwERpacPdxWmUvww.md | 35 ++++++ .../IDistributedReaderWriterLock.md | 28 +++++ ...ReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md | 18 +++ .../IDistributedReaderWriterLockProvider.md | 18 +++ ...emaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md | 35 ++++++ .../OOOHUBoRAQHgD31Q.md | 35 ++++++ .../IDistributedSemaphore.MaxCount.md | 14 +++ .../IDistributedSemaphore.Name.md | 13 +++ ...phore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md | 35 ++++++ ....TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md | 35 ++++++ .../IDistributedSemaphore.md | 23 ++++ ....CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md | 22 ++++ .../IDistributedSemaphoreProvider.md | 15 +++ ...edSynchronizationHandle.HandleLostToken.md | 24 ++++ .../IDistributedSynchronizationHandle.md | 22 ++++ ...radeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md | 35 ++++++ .../LbfIJrScMNU14D5OvA.md | 35 ++++++ ...radeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md | 35 ++++++ .../1w.md | 35 ++++++ ...IDistributedUpgradeableReaderWriterLock.md | 22 ++++ ...ReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md | 18 +++ ...utedUpgradeableReaderWriterLockProvider.md | 18 +++ .../Medallion.Threading.md | 24 ++++ docs/api/DistributedLock.Core/README.md | 7 ++ ...ibutedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md | 23 ++++ .../N7mTMuqXSs9QBL49fhQcQ.md | 18 +++ ...utedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md | 37 ++++++ ...ock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md | 37 ++++++ .../FileDistributedLock.Name.md | 15 +++ ...dLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md | 37 ++++++ ....TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md | 37 ++++++ .../FileDistributedLock.md | 31 +++++ .../FileDistributedLockHandle.Dispose().md | 12 ++ ...ileDistributedLockHandle.DisposeAsync().md | 15 +++ .../FileDistributedLockHandle.md | 22 ++++ .../CskpBpX2hNqtA.md | 15 +++ .../BmarBn5NPtnEydKr3pQ.md | 20 ++++ .../FileDistributedSynchronizationProvider.md | 23 ++++ .../Medallion.Threading.FileSystem.md | 9 ++ docs/api/DistributedLock.FileSystem/README.md | 7 ++ .../Medallion.Threading.MySql.md | 10 ++ ...KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md | 25 +++++ ....UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md | 31 +++++ .../MySqlConnectionOptionsBuilder.md | 17 +++ ...ibutedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md | 28 +++++ ...ibutedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md | 25 +++++ ...ibutedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md | 30 +++++ .../fV/58/g2xfKSkMNPcJIQ.md | 37 ++++++ ...ock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md | 37 ++++++ .../MySqlDistributedLock.Name.md | 15 +++ .../j6w.md | 37 ++++++ ....TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md | 37 ++++++ .../MySqlDistributedLock.md | 32 ++++++ .../MySqlDistributedLockHandle.Dispose().md | 12 ++ ...SqlDistributedLockHandle.DisposeAsync().md | 15 +++ ...qlDistributedLockHandle.HandleLostToken.md | 15 +++ .../MySqlDistributedLockHandle.md | 26 +++++ ...onProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md | 15 +++ ...onProvider..ctor.pke77kyAr68Nsic0RCNm1g.md | 15 +++ .../nOe7Is6T7o1EV/QK7Yew.md | 19 ++++ ...vider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md | 23 ++++ ...MySqlDistributedSynchronizationProvider.md | 25 +++++ docs/api/DistributedLock.MySql/README.md | 7 ++ .../Medallion.Threading.Oracle.md | 13 +++ .../QhqJGH/58Hukqw.md | 23 ++++ .../7Q6X3Jg.md | 31 +++++ .../OracleConnectionOptionsBuilder.md | 17 +++ .../b645uSsJRoN1RGNqS0EQ.md | 30 +++++ .../yRSLZE0t3dA.md | 25 +++++ ...utedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md | 37 ++++++ ...ock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md | 37 ++++++ .../OracleDistributedLock.Name.md | 15 +++ ...dLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md | 37 ++++++ .../SHuju3pt92jk0aHMPqQ.md | 37 ++++++ .../OracleDistributedLock.md | 31 +++++ .../OracleDistributedLockHandle.Dispose().md | 12 ++ ...cleDistributedLockHandle.DisposeAsync().md | 15 +++ ...leDistributedLockHandle.HandleLostToken.md | 15 +++ .../OracleDistributedLockHandle.md | 26 +++++ ...WriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md | 31 +++++ ...WriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md | 28 +++++ ....AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md | 37 ++++++ .../OmDfG5O0jJHDbg.md | 37 ++++++ ...radeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md | 37 ++++++ ...bleReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md | 37 ++++++ ...AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md | 37 ++++++ ...reWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md | 37 ++++++ .../OracleDistributedReaderWriterLock.Name.md | 15 +++ ...yAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md | 37 ++++++ ...ireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md | 37 ++++++ ...radeableReadLock.pCah2aRljYOlO0JIWgorWA.md | 37 ++++++ .../n2EnWZfs+furVMXeXQ.md | 37 ++++++ .../Rkv1mHYQ.md | 37 ++++++ .../h8laY2Ll0B3qHLA.md | 37 ++++++ .../OracleDistributedReaderWriterLock.md | 40 +++++++ ...ributedReaderWriterLockHandle.Dispose().md | 12 ++ ...edReaderWriterLockHandle.DisposeAsync().md | 15 +++ ...dReaderWriterLockHandle.HandleLostToken.md | 15 +++ ...OracleDistributedReaderWriterLockHandle.md | 29 +++++ ...terLockUpgradeableHandle.DisposeAsync().md | 15 +++ ...erLockUpgradeableHandle.HandleLostToken.md | 15 +++ .../jHol+SIt7DlqMKC8v111g.md | 24 ++++ ...ToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md | 24 ++++ ...gradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md | 21 ++++ ...ToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md | 24 ++++ ...ibutedReaderWriterLockUpgradeableHandle.md | 30 +++++ .../WYsARra1TfMA.md | 19 ++++ ...onProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md | 15 +++ .../hOrfQ/3Ylf2MDrw.md | 23 ++++ ...ReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md | 23 ++++ ...racleDistributedSynchronizationProvider.md | 28 +++++ docs/api/DistributedLock.Oracle/README.md | 7 ++ .../Medallion.Threading.Postgres.md | 16 +++ ...oryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md | 20 ++++ ...oryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md | 27 +++++ .../uWeBQ.md | 16 +++ .../RcjHTGcjW0iCLCkA.md | 18 +++ .../Q.md | 18 +++ .../PostgresAdvisoryLockKey.GetHashCode().md | 13 +++ .../PostgresAdvisoryLockKey.ToString().md | 14 +++ .../PostgresAdvisoryLockKey.md | 32 ++++++ ...kKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md | 22 ++++ ...ey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md | 22 ++++ ...KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md | 23 ++++ .../FdhQ+S89ng.md | 31 +++++ .../PostgresConnectionOptionsBuilder.md | 17 +++ ...ibutedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md | 19 ++++ ...ibutedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md | 24 ++++ ...utedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md | 37 ++++++ .../1suZB7AWMDkEWqA.md | 37 ++++++ .../PostgresDistributedLock.Key.md | 13 +++ ...dLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md | 37 ++++++ ....TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md | 37 ++++++ .../PostgresDistributedLock.md | 32 ++++++ ...PostgresDistributedLockHandle.Dispose().md | 12 ++ ...resDistributedLockHandle.DisposeAsync().md | 15 +++ ...esDistributedLockHandle.HandleLostToken.md | 15 +++ .../PostgresDistributedLockHandle.md | 26 +++++ ...WriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md | 24 ++++ ...WriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md | 19 ++++ ....AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md | 37 ++++++ ...ireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md | 37 ++++++ ...AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md | 37 ++++++ .../oI1g.md | 37 ++++++ ...PostgresDistributedReaderWriterLock.Key.md | 13 +++ .../chMVDaFHN9df7XbbnXg.md | 37 ++++++ ...ireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md | 37 ++++++ .../g.md | 37 ++++++ ...reWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md | 37 ++++++ .../PostgresDistributedReaderWriterLock.md | 36 ++++++ ...ributedReaderWriterLockHandle.Dispose().md | 12 ++ ...edReaderWriterLockHandle.DisposeAsync().md | 15 +++ ...dReaderWriterLockHandle.HandleLostToken.md | 15 +++ ...stgresDistributedReaderWriterLockHandle.md | 26 +++++ .../6Rn0lmgbFNQtUvw.md | 15 +++ .../O9iDMaj84A.md | 19 ++++ ...vider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md | 18 +++ ...ReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md | 18 +++ ...tgresDistributedSynchronizationProvider.md | 27 +++++ docs/api/DistributedLock.Postgres/README.md | 7 ++ .../Medallion.Threading.Redis.md | 14 +++ docs/api/DistributedLock.Redis/README.md | 7 ++ .../ZDgt9bfHHg.md | 23 ++++ ...ibutedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md | 23 ++++ ...utedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md | 37 ++++++ .../QjYv9rC4HwcQmk9yh4x5g.md | 37 ++++++ .../RedisDistributedLock.Key.md | 13 +++ .../RedisDistributedLock.Name.md | 15 +++ ...dLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md | 37 ++++++ .../5kjZQ.md | 37 ++++++ .../RedisDistributedLock.md | 32 ++++++ .../RedisDistributedLockHandle.Dispose().md | 12 ++ ...disDistributedLockHandle.DisposeAsync().md | 15 +++ ...isDistributedLockHandle.HandleLostToken.md | 15 +++ .../RedisDistributedLockHandle.md | 26 +++++ .../r8BOTbBDgotYOw.md | 23 ++++ .../Na6Nw.md | 23 ++++ .../oxr4gs+xtfk1ETgOWmw.md | 37 ++++++ ...ireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md | 37 ++++++ .../g.md | 37 ++++++ ...reWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md | 37 ++++++ .../RedisDistributedReaderWriterLock.Name.md | 15 +++ .../92A.md | 37 ++++++ ...ireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md | 37 ++++++ ...AcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md | 37 ++++++ ...reWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md | 37 ++++++ .../RedisDistributedReaderWriterLock.md | 35 ++++++ ...ributedReaderWriterLockHandle.Dispose().md | 12 ++ ...edReaderWriterLockHandle.DisposeAsync().md | 15 +++ ...dReaderWriterLockHandle.HandleLostToken.md | 15 +++ .../RedisDistributedReaderWriterLockHandle.md | 26 +++++ .../CEuDZg.md | 27 +++++ ...emaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md | 37 ++++++ .../DINCj0PXg31neVA.md | 37 ++++++ .../RedisDistributedSemaphore.MaxCount.md | 15 +++ .../RedisDistributedSemaphore.Name.md | 15 +++ ...phore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md | 37 ++++++ ....TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md | 37 ++++++ .../RedisDistributedSemaphore.md | 31 +++++ ...disDistributedSemaphoreHandle.Dispose().md | 12 ++ ...stributedSemaphoreHandle.DisposeAsync().md | 15 +++ ...tributedSemaphoreHandle.HandleLostToken.md | 15 +++ .../RedisDistributedSemaphoreHandle.md | 26 +++++ .../k+WORQrlfNeKapMJREAw.md | 31 +++++ ...nsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md | 24 ++++ ...ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md | 22 ++++ ....MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md | 23 ++++ ...istributedSynchronizationOptionsBuilder.md | 19 ++++ ...onProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md | 23 ++++ ...onProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md | 20 ++++ ...vider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md | 18 +++ ...ReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md | 20 ++++ ....CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md | 22 ++++ ...RedisDistributedSynchronizationProvider.md | 30 +++++ .../Medallion.Threading.SqlServer.md | 15 +++ docs/api/DistributedLock.SqlServer/README.md | 7 ++ ...KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md | 28 +++++ ....UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md | 31 +++++ ...r.UseTransaction.TqcdtREm34ssKiEMMEofaA.md | 23 ++++ .../SqlConnectionOptionsBuilder.md | 18 +++ ...ibutedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md | 31 +++++ ...ibutedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md | 28 +++++ .../GL1w.md | 28 +++++ ...utedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md | 37 ++++++ .../yzFNt8CX+DvrGY7Ew.md | 37 ++++++ .../SqlDistributedLock.Name.md | 15 +++ ...dLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md | 37 ++++++ .../hHjaF2Q.md | 37 ++++++ .../SqlDistributedLock.md | 33 ++++++ .../SqlDistributedLockHandle.Dispose().md | 12 ++ ...SqlDistributedLockHandle.DisposeAsync().md | 15 +++ ...qlDistributedLockHandle.HandleLostToken.md | 15 +++ .../SqlDistributedLockHandle.md | 26 +++++ .../fj2Yk0d/CnC3hDs1y3Cg.md | 28 +++++ .../D2jE25+dg.md | 28 +++++ ...WriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md | 31 +++++ .../jUeLkzFiukmQ.md | 37 ++++++ ...ireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md | 37 ++++++ ...radeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md | 37 ++++++ .../YUdo7XWAgnG1T4s0f5Vw.md | 37 ++++++ .../TaMbin4RU73eiA.md | 37 ++++++ ...reWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md | 37 ++++++ .../SqlDistributedReaderWriterLock.Name.md | 15 +++ ...yAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md | 37 ++++++ ...ireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md | 37 ++++++ ...radeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md | 37 ++++++ ...bleReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md | 37 ++++++ ...AcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md | 37 ++++++ ...reWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md | 37 ++++++ .../SqlDistributedReaderWriterLock.md | 47 ++++++++ ...ributedReaderWriterLockHandle.Dispose().md | 12 ++ ...edReaderWriterLockHandle.DisposeAsync().md | 15 +++ ...dReaderWriterLockHandle.HandleLostToken.md | 15 +++ .../SqlDistributedReaderWriterLockHandle.md | 29 +++++ ...terLockUpgradeableHandle.DisposeAsync().md | 15 +++ ...erLockUpgradeableHandle.HandleLostToken.md | 15 +++ ...gradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md | 24 ++++ .../328XUBw.md | 24 ++++ .../9hXGBo4CJ+m0bw.md | 21 ++++ ...ToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md | 24 ++++ ...ibutedReaderWriterLockUpgradeableHandle.md | 30 +++++ ...dSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md | 26 +++++ .../TmHEv8QIhpjqtxBSqudA.md | 26 +++++ .../ahDpIg3est068m3+NgA.md | 28 +++++ .../AB5PR0OVZDpw.md | 37 ++++++ .../zoZcbd0xQw.md | 37 ++++++ .../SqlDistributedSemaphore.MaxCount.md | 15 +++ .../SqlDistributedSemaphore.Name.md | 15 +++ ...phore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md | 37 ++++++ .../rW6ewYOdNw.md | 37 ++++++ .../SqlDistributedSemaphore.md | 33 ++++++ ...SqlDistributedSemaphoreHandle.Dispose().md | 12 ++ ...stributedSemaphoreHandle.DisposeAsync().md | 15 +++ ...tributedSemaphoreHandle.HandleLostToken.md | 15 +++ .../SqlDistributedSemaphoreHandle.md | 26 +++++ ...onProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md | 15 +++ ...onProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md | 19 ++++ ...onProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md | 15 +++ .../tAHXb7DSNADefkuRKg.md | 23 ++++ .../sU0nmoSgVAlSEihYgHv9Q.md | 23 ++++ ....CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md | 24 ++++ .../SqlDistributedSynchronizationProvider.md | 32 ++++++ ...ibutedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md | 28 +++++ ...tedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md} | 9 +- .../XRVgkI/77ehHSwgz3+6g.md} | 9 +- .../EventWaitHandleDistributedLock.Name.md | 15 +++ ...Lock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md} | 9 +- .../IL0puVDTMR7U2w.md} | 9 +- .../EventWaitHandleDistributedLock.md | 30 +++++ ...itHandleDistributedLockHandle.Dispose().md | 12 ++ ...leDistributedLockHandle.DisposeAsync().md} | 3 +- .../EventWaitHandleDistributedLockHandle.md | 22 ++++ .../Medallion.Threading.WaitHandles.md | 11 ++ .../api/DistributedLock.WaitHandles/README.md | 7 ++ ...dSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md | 32 ++++++ ...maphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md} | 9 +- .../1m4DGGHNWVI0rSw.md} | 9 +- ...WaitHandleDistributedSemaphore.MaxCount.md | 15 +++ .../WaitHandleDistributedSemaphore.Name.md | 15 +++ .../+WmA.md} | 9 +- ...TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md} | 9 +- .../WaitHandleDistributedSemaphore.md | 31 +++++ ...dleDistributedSemaphoreHandle.Dispose().md | 12 ++ ...tributedSemaphoreHandle.DisposeAsync().md} | 3 +- ...tributedSemaphoreHandle.HandleLostToken.md | 15 +++ .../WaitHandleDistributedSemaphoreHandle.md | 26 +++++ .../KT0BMNM9Fg.md | 15 +++ .../NJBO/BPj27n2I4gbA.md | 23 ++++ ....CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md | 28 +++++ ...andleDistributedSynchronizationProvider.md | 26 +++++ .../Medallion.Threading.ZooKeeper.md | 18 +++ docs/api/DistributedLock.ZooKeeper/README.md | 7 ++ .../JnVaogxN4UVbbBww.md | 30 +++++ .../J7K06jJzbPO75s7Pg.md | 26 +++++ .../TLwd8GsE6eSegfTOg.md | 30 +++++ ...ock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md | 37 ++++++ ...dallion.Threading.IDistributedLock.Name.md | 13 +++ .../ZooKeeperDistributedLock.Path.md | 13 +++ .../Osz5FH2DXIg.md | 37 ++++++ .../ZooKeeperDistributedLock.md | 35 ++++++ ...perDistributedLockHandle.DisposeAsync().md | 15 +++ ...erDistributedLockHandle.HandleLostToken.md | 15 +++ .../ZooKeeperDistributedLockHandle.md | 25 +++++ ...WriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md | 30 +++++ ...WriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md | 30 +++++ .../wQ.md | 26 +++++ ...ireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md | 37 ++++++ ...reWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md | 37 ++++++ ...ading.IDistributedReaderWriterLock.Name.md | 13 +++ ...oKeeperDistributedReaderWriterLock.Path.md | 13 +++ ...ireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md | 37 ++++++ ...reWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md | 37 ++++++ .../ZooKeeperDistributedReaderWriterLock.md | 36 ++++++ ...edReaderWriterLockHandle.DisposeAsync().md | 15 +++ ...dReaderWriterLockHandle.HandleLostToken.md | 15 +++ ...KeeperDistributedReaderWriterLockHandle.md | 25 +++++ ...dSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md | 34 ++++++ ...dSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md | 34 ++++++ .../TgjjnsQT9A.md | 30 +++++ ...ore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md | 37 ++++++ .../ZooKeeperDistributedSemaphore.MaxCount.md | 15 +++ ...on.Threading.IDistributedSemaphore.Name.md | 13 +++ .../ZooKeeperDistributedSemaphore.Path.md | 13 +++ ....TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md | 37 ++++++ .../ZooKeeperDistributedSemaphore.md | 35 ++++++ ...stributedSemaphoreHandle.DisposeAsync().md | 15 +++ ...tributedSemaphoreHandle.HandleLostToken.md | 15 +++ .../ZooKeeperDistributedSemaphoreHandle.md | 25 +++++ ...AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md | 29 +++++ ...lder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md | 26 +++++ .../ihabf4bAq6D8+832gAKA.md | 20 ++++ ...r.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md | 22 ++++ ...istributedSynchronizationOptionsBuilder.md | 19 ++++ ...onProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md | 24 ++++ ...onProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md | 20 ++++ ...vider.CreateLock.F3xNt1712Th0LXGKBIudtA.md | 20 ++++ .../2I6g3IA.md | 20 ++++ .../8MW9887Y7GcGqa+mUYdzQ.md | 24 ++++ ...eeperDistributedSynchronizationProvider.md | 30 +++++ ...KeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md | 15 +++ .../wqdQppznvVwiU3kq31Q.md | 18 +++ ...eeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md | 18 +++ .../ZooKeeperPath.GetHashCode().md | 13 +++ .../ZooKeeperPath.ToString().md | 13 +++ .../ZooKeeperPath.md | 30 +++++ .../aa6pYstqDJebg.md | 22 ++++ ...th.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md | 22 ++++ docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md | 22 ---- docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md | 9 -- docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md | 14 --- docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md | 11 -- docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md | 27 ----- docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md | 31 ----- docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md | 14 --- docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md | 29 ----- docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md | 25 ----- docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md | 14 --- docs/apiReference/TGomeSLpasysM1hnh_3gqw.md | 11 -- docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md | 25 ----- docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md | 21 ---- docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md | 14 --- docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md | 14 --- docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md | 27 ----- docs/apiReference/u++QKv1+Gje9fkJlbjceow.md | 30 ----- 460 files changed, 10828 insertions(+), 397 deletions(-) delete mode 100644 DefaultDocumentation.json create mode 100644 DistributedLockCodeGen/ApiDocGenerator.cs create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.LeaseId.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md create mode 100644 docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md create mode 100644 docs/api/DistributedLock.Azure/Medallion.Threading.Azure.md create mode 100644 docs/api/DistributedLock.Azure/README.md create mode 100644 docs/api/DistributedLock.Core/DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md create mode 100644 docs/api/DistributedLock.Core/DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md create mode 100644 docs/api/DistributedLock.Core/DeadlockException.DeadlockException().md create mode 100644 docs/api/DistributedLock.Core/DeadlockException.md create mode 100644 docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md create mode 100644 docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md create mode 100644 docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md create mode 100644 docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md create mode 100644 docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md create mode 100644 docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md create mode 100644 docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md create mode 100644 docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md create mode 100644 docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md create mode 100644 docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md create mode 100644 docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md create mode 100644 docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md create mode 100644 docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md create mode 100644 docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md create mode 100644 docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLock.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockProvider.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md create mode 100644 docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphore.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md create mode 100644 docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md create mode 100644 docs/api/DistributedLock.Core/Medallion.Threading.md create mode 100644 docs/api/DistributedLock.Core/README.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLock.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md create mode 100644 docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.FileSystem/Medallion.Threading.FileSystem.md create mode 100644 docs/api/DistributedLock.FileSystem/README.md create mode 100644 docs/api/DistributedLock.MySql/Medallion.Threading.MySql.md create mode 100644 docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md create mode 100644 docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md create mode 100644 docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLock.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor/nOe7Is6T7o1EV/QK7Yew.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md create mode 100644 docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.MySql/README.md create mode 100644 docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md create mode 100644 docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md create mode 100644 docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLock.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.Name.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock/jHol+SIt7DlqMKC8v111g.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md create mode 100644 docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.Oracle/README.md create mode 100644 docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.GetHashCode().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.Key.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLock.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.Key.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md create mode 100644 docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.Postgres/README.md create mode 100644 docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md create mode 100644 docs/api/DistributedLock.Redis/README.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.Key.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLock.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.Name.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.MaxCount.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Name.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphore.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.Dispose().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md create mode 100644 docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md create mode 100644 docs/api/DistributedLock.SqlServer/README.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLock.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.Name.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.Dispose().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.8oq6BCJTyac4Rk/328XUBw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.jbRB6OR/9hXGBo4CJ+m0bw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.MaxCount.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Name.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.Dispose().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md create mode 100644 docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md rename docs/{apiReference/csc50wjfYFMfhVMh9f0p5g.md => api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md} (67%) rename docs/{apiReference/Q_XRVgkI_77ehHSwgz3+6g.md => api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md} (67%) create mode 100644 docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Name.md rename docs/{apiReference/uJMovE7EIAyUhcQlWkoiMg.md => api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md} (57%) rename docs/{apiReference/bF7Wpky_IL0puVDTMR7U2w.md => api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md} (62%) create mode 100644 docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md create mode 100644 docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.Dispose().md rename docs/{apiReference/rAn7UJB4AMy2LlyftHh0jQ.md => api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.DisposeAsync().md} (60%) create mode 100644 docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md create mode 100644 docs/api/DistributedLock.WaitHandles/README.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md rename docs/{apiReference/fanbWVO3U0ELSV89GyikgQ.md => api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md} (67%) rename docs/{apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md => api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md} (67%) create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.MaxCount.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Name.md rename docs/{apiReference/xAXKRX1HdsJVylWBC_+WmA.md => api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md} (57%) rename docs/{apiReference/nk6f9CuMtAPqAG7F0UWvSA.md => api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md} (62%) create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.Dispose().md rename docs/{apiReference/GYxpHZnJiw9JgevQ9jPjWg.md => api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.DisposeAsync().md} (60%) create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md create mode 100644 docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md create mode 100644 docs/api/DistributedLock.ZooKeeper/README.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Path.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Path.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.MaxCount.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Path.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.DisposeAsync().md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.HandleLostToken.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateSemaphore/8MW9887Y7GcGqa+mUYdzQ.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.J5/wqdQppznvVwiU3kq31Q.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.GetHashCode().md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.ToString().md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Equality.0Gh9Mk6h/aa6pYstqDJebg.md create mode 100644 docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md delete mode 100644 docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md delete mode 100644 docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md delete mode 100644 docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md delete mode 100644 docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md delete mode 100644 docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md delete mode 100644 docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md delete mode 100644 docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md delete mode 100644 docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md delete mode 100644 docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md delete mode 100644 docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md delete mode 100644 docs/apiReference/TGomeSLpasysM1hnh_3gqw.md delete mode 100644 docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md delete mode 100644 docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md delete mode 100644 docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md delete mode 100644 docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md delete mode 100644 docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md delete mode 100644 docs/apiReference/u++QKv1+Gje9fkJlbjceow.md diff --git a/DefaultDocumentation.json b/DefaultDocumentation.json deleted file mode 100644 index 1bd71e3d..00000000 --- a/DefaultDocumentation.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "OutputDirectoryPath": "docs/apiReference", - "GeneratedAccessModifiers": "Public,Protected,ProtectedInternal", - "ExternLinksFilePaths": ["publish/apiReference/*.links..txt"], - "FileNameFactory": "Md5", - "LogLevel": "Trace" -} \ No newline at end of file diff --git a/DistributedLock.Core/DistributedLock.Core.csproj b/DistributedLock.Core/DistributedLock.Core.csproj index 604eca39..4779cea0 100644 --- a/DistributedLock.Core/DistributedLock.Core.csproj +++ b/DistributedLock.Core/DistributedLock.Core.csproj @@ -55,13 +55,5 @@ - - - - ..\DefaultDocumentation.json - ..\publish\apiReference\$(AssemblyName).links.txt - - - - + \ No newline at end of file diff --git a/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj b/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj index 7a42313e..508bd1bd 100644 --- a/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj +++ b/DistributedLock.WaitHandles/DistributedLock.WaitHandles.csproj @@ -54,12 +54,4 @@ - - - ..\DefaultDocumentation.json - ..\publish\apiReference\$(AssemblyName).links.txt - - - - \ No newline at end of file diff --git a/DistributedLockCodeGen/ApiDocGenerator.cs b/DistributedLockCodeGen/ApiDocGenerator.cs new file mode 100644 index 00000000..61732c0e --- /dev/null +++ b/DistributedLockCodeGen/ApiDocGenerator.cs @@ -0,0 +1,106 @@ +using Medallion.Shell; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace DistributedLockCodeGen +{ + internal class ApiDocGenerator + { + private const string DotNetPath = @"C:\Program Files\dotnet\dotnet.exe"; + private const string DocsFramework = "netstandard2.1"; + private const string DocsFolder = "docs"; + private const string ApiFolder = "api"; + + private static readonly Shell Shell = new( + options => options.ThrowOnError() + .Command(c => c.RedirectStandardErrorTo(Console.Error).RedirectTo(Console.Out)) + ); + + +#if RELEASE + [Test] +#endif + public async Task GenerateApiDocs() + { + var result = await Shell.Run(DotNetPath, new[] { "tool", "install", "DefaultDocumentation.Console", "-g" }, options: o => o.ThrowOnError(false)).Task; + Assert.That(result.ExitCode, Is.EqualTo(0).Or.EqualTo(1)); // 1 == already installed + + var tempDirectory = Path.Combine(Path.GetTempPath(), $"DistributedLockApiDocGen_{DateTime.UtcNow.Ticks}"); + try + { + Directory.CreateDirectory(tempDirectory); + await GenerateApiDocsAsync(tempDirectory); + } + finally + { + DeleteDirectoryIfExists(tempDirectory); + } + } + + private static async Task GenerateApiDocsAsync(string tempDirectory) + { + var publishDirectory = Path.Combine(CodeGenHelpers.SolutionDirectory, DocsFolder, ApiFolder); + DeleteDirectoryIfExists(publishDirectory); + + var linksPath = Path.Combine(tempDirectory, "links"); + Directory.CreateDirectory(linksPath); + + var contentPath = Path.Combine(tempDirectory, "output"); + Directory.CreateDirectory(contentPath); + + var projectDirectories = Directory.GetDirectories(CodeGenHelpers.SolutionDirectory, "DistributedLock.*") + .Where(d => !d.EndsWith(".Tests", StringComparison.OrdinalIgnoreCase) && !d.EndsWith("DistributedLock", StringComparison.OrdinalIgnoreCase)); + + for (var i = 0; i < 2; ++i) + { + foreach (var projectDirectory in projectDirectories) + { + await GenerateApiDocsAsync(projectDirectory); + } + } + + Directory.Move(contentPath, publishDirectory); + + async Task GenerateApiDocsAsync(string projectDirectory) + { + var projectName = Path.GetFileName(projectDirectory); + var binDirectory = Path.Combine(projectDirectory, "bin", "Release", DocsFramework); + + var config = new + { + AssemblyFilePath = Path.Combine(binDirectory, projectName + ".dll"), + DocumentationFilePath = Path.Combine(binDirectory, projectName + ".xml"), + ProjectDirectoryPath = projectDirectory, + OutputDirectoryPath = Path.Combine(contentPath, projectName), + AssemblyPageName = "README", + GeneratedAccessModifiers = "Public,Protected,ProtectedInternal", + GeneratedPages = "Assembly,Namespaces,Types,Members", + LinksOutputFilePath = Path.Combine(linksPath, projectName + ".txt"), + LinksBaseUrl = $"https://github.com/madelson/DistributedLock/tree/default-documentation/{DocsFolder}/{ApiFolder}/{projectName}/", + ExternLinksFilePaths = new string[] { Path.Combine(linksPath, "*.txt") }, + FileNameFactory = "NameAndMd5Mix", + }; + + var configFilePath = Path.Combine(tempDirectory, projectName + "_config.json"); + File.WriteAllText(configFilePath, JsonSerializer.Serialize(config)); + + DeleteDirectoryIfExists(config.OutputDirectoryPath); + await Shell.Run("defaultdocumentation", "-j", configFilePath).Task; + } + } + + private static void DeleteDirectoryIfExists(string directory) + { + if (Directory.Exists(directory)) + { + Directory.Delete(directory, recursive: true); + } + } + } +} diff --git a/DistributedLockCodeGen/DistributedLockCodeGen.csproj b/DistributedLockCodeGen/DistributedLockCodeGen.csproj index ebf81e62..6463b066 100644 --- a/DistributedLockCodeGen/DistributedLockCodeGen.csproj +++ b/DistributedLockCodeGen/DistributedLockCodeGen.csproj @@ -1,7 +1,8 @@  - netcoreapp3.1 + net6.0 + Latest false enable @@ -13,6 +14,7 @@ + diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md new file mode 100644 index 00000000..ea3a5cb7 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock(BlobContainerClient, string, Action) Constructor + +Constructs a lock that will lease a blob based on [name](AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient,string,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).name 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient, string, System.Action).name') within the provided [blobContainerClient](AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient,string,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobContainerClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient, string, System.Action).blobContainerClient'). + +```csharp +public AzureBlobLeaseDistributedLock(BlobContainerClient blobContainerClient, string name, System.Action? options=null); +``` +#### Parameters + + + +`blobContainerClient` [Azure.Storage.Blobs.BlobContainerClient](https://docs.microsoft.com/en-us/dotnet/api/Azure.Storage.Blobs.BlobContainerClient 'Azure.Storage.Blobs.BlobContainerClient') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md new file mode 100644 index 00000000..5f95b451 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock(BlobBaseClient, Action) Constructor + +Constructs a lock that will lease the provided [blobClient](AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobBaseClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobBaseClient, System.Action).blobClient') + +```csharp +public AzureBlobLeaseDistributedLock(BlobBaseClient blobClient, System.Action? options=null); +``` +#### Parameters + + + +`blobClient` [Azure.Storage.Blobs.Specialized.BlobBaseClient](https://docs.microsoft.com/en-us/dotnet/api/Azure.Storage.Blobs.Specialized.BlobBaseClient 'Azure.Storage.Blobs.Specialized.BlobBaseClient') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md new file mode 100644 index 00000000..e8eb6c7c --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') +An [AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md new file mode 100644 index 00000000..16e5ba53 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Name.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Name.md new file mode 100644 index 00000000..34eaa9c3 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md new file mode 100644 index 00000000..5d82d03c --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') +An [AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md new file mode 100644 index 00000000..f7568516 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +## AzureBlobLeaseDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.md new file mode 100644 index 00000000..102f0c9d --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure') + +## AzureBlobLeaseDistributedLock Class + +Implements a [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on Azure blob leases + +```csharp +public sealed class AzureBlobLeaseDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 AzureBlobLeaseDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [AzureBlobLeaseDistributedLock(BlobBaseClient, Action<AzureBlobLeaseOptionsBuilder>)](AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobBaseClient, System.Action)') | Constructs a lock that will lease the provided [blobClient](AzureBlobLeaseDistributedLock..ctor.PPb+8c/p7LTz4wSm4vPWGg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobBaseClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobBaseClient, System.Action).blobClient') | +| [AzureBlobLeaseDistributedLock(BlobContainerClient, string, Action<AzureBlobLeaseOptionsBuilder>)](AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient, string, System.Action)') | Constructs a lock that will lease a blob based on [name](AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient,string,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).name 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient, string, System.Action).name') within the provided [blobContainerClient](AzureBlobLeaseDistributedLock..ctor.5tADfQ9q5nXUDj477SWvHg.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient,string,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobContainerClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AzureBlobLeaseDistributedLock(BlobContainerClient, string, System.Action).blobContainerClient'). | + +| Properties | | +| :--- | :--- | +| [Name](AzureBlobLeaseDistributedLock.Name.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..0984c92d --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') + +## AzureBlobLeaseDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..7043c61e --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') + +## AzureBlobLeaseDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..6c793b9b --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') + +## AzureBlobLeaseDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.LeaseId.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.LeaseId.md new file mode 100644 index 00000000..db62f799 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.LeaseId.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') + +## AzureBlobLeaseDistributedLockHandle.LeaseId Property + +The underlying Azure lease ID + +```csharp +public string LeaseId { get; } +``` + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.md new file mode 100644 index 00000000..0b78077f --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLockHandle.md @@ -0,0 +1,27 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure') + +## AzureBlobLeaseDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class AzureBlobLeaseDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 AzureBlobLeaseDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](AzureBlobLeaseDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | +| [LeaseId](AzureBlobLeaseDistributedLockHandle.LeaseId.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle.LeaseId') | The underlying Azure lease ID | + +| Methods | | +| :--- | :--- | +| [Dispose()](AzureBlobLeaseDistributedLockHandle.Dispose().md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](AzureBlobLeaseDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md new file mode 100644 index 00000000..62759c54 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedSynchronizationProvider](AzureBlobLeaseDistributedSynchronizationProvider.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider') + +## AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, Action) Constructor + +Constructs a provider that scopes blobs within the provided [blobContainerClient](AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobContainerClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, System.Action).blobContainerClient') and uses the provided [options](AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).options 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, System.Action).options'). + +```csharp +public AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient blobContainerClient, System.Action? options=null); +``` +#### Parameters + + + +`blobContainerClient` [Azure.Storage.Blobs.BlobContainerClient](https://docs.microsoft.com/en-us/dotnet/api/Azure.Storage.Blobs.BlobContainerClient 'Azure.Storage.Blobs.BlobContainerClient') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md new file mode 100644 index 00000000..a3a27623 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md @@ -0,0 +1,20 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseDistributedSynchronizationProvider](AzureBlobLeaseDistributedSynchronizationProvider.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider') + +## AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string) Method + +Constructs an [AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') with the given [name](AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string).name'). + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseDistributedLock CreateLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +Implements [CreateLock(string)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(System.String)') + +#### Returns +[AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.md new file mode 100644 index 00000000..ecb59d71 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedSynchronizationProvider.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure') + +## AzureBlobLeaseDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') + +```csharp +public sealed class AzureBlobLeaseDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 AzureBlobLeaseDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + +| Constructors | | +| :--- | :--- | +| [AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, Action<AzureBlobLeaseOptionsBuilder>)](AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, System.Action)') | Constructs a provider that scopes blobs within the provided [blobContainerClient](AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).blobContainerClient 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, System.Action).blobContainerClient') and uses the provided [options](AzureBlobLeaseDistributedSynchronizationProvider..ctor.zZb9hLixHKXBbm4hZNaVyQ.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient,System.Action_Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder_).options 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.AzureBlobLeaseDistributedSynchronizationProvider(BlobContainerClient, System.Action).options'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string)](AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string)') | Constructs an [AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') with the given [name](AzureBlobLeaseDistributedSynchronizationProvider.CreateLock.I34EpC7k9lisV6FiK0xunw.md#Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider.CreateLock(string).name'). | diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md new file mode 100644 index 00000000..f6ad04a3 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') + +## AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime(TimeSpan, TimeSpan) Method + +Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps. +This determines how much time is spent sleeping between attempts. Lower values will raise the +volume of acquire requests under contention but will also raise the responsiveness (how long +it takes a waiter to notice that a contended the lease has become available). + +Specifying a range of values allows the implementation to select an actual value in the range +at random for each sleep. This helps avoid the case where two clients become "synchronized" +in such a way that results in one client monopolizing the lease. + +The default is [250ms, 1s] + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder BusyWaitSleepTime(System.TimeSpan min, System.TimeSpan max); +``` +#### Parameters + + + +`min` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`max` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md new file mode 100644 index 00000000..8a3b3560 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md @@ -0,0 +1,27 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') + +## AzureBlobLeaseOptionsBuilder.Duration(TimeSpan) Method + +Specifies how long the lease will last, absent auto-renewal. + +If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests, +while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to +exit without explicitly releasing, then duration determines how long other processes would need to wait in +order to acquire the lease. + +If auto-renewal is disabled, then duration determines how long the lease will be held. + +Defaults to 30s. + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder Duration(System.TimeSpan duration); +``` +#### Parameters + + + +`duration` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md new file mode 100644 index 00000000..11349a84 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure').[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') + +## AzureBlobLeaseOptionsBuilder.RenewalCadence(TimeSpan) Method + +Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests +but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in +before the lease duration expires. + +To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + +Defaults to 1/3 of the specified lease duration (may be infinite). + +```csharp +public Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder RenewalCadence(System.TimeSpan renewalCadence); +``` +#### Parameters + + + +`renewalCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md new file mode 100644 index 00000000..780b51d1 --- /dev/null +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Azure](README.md 'README') +### [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure') + +## AzureBlobLeaseOptionsBuilder Class + +Specifies options for an Azure blob lease + +```csharp +public sealed class AzureBlobLeaseOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 AzureBlobLeaseOptionsBuilder + +| Methods | | +| :--- | :--- | +| [BusyWaitSleepTime(TimeSpan, TimeSpan)](AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps.
This determines how much time is spent sleeping between attempts. Lower values will raise the
volume of acquire requests under contention but will also raise the responsiveness (how long
it takes a waiter to notice that a contended the lease has become available).

Specifying a range of values allows the implementation to select an actual value in the range
at random for each sleep. This helps avoid the case where two clients become "synchronized"
in such a way that results in one client monopolizing the lease.

The default is [250ms, 1s] | +| [Duration(TimeSpan)](AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.Duration(System.TimeSpan)') | Specifies how long the lease will last, absent auto-renewal.

If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests,
while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to
exit without explicitly releasing, then duration determines how long other processes would need to wait in
order to acquire the lease.

If auto-renewal is disabled, then duration determines how long the lease will be held.

Defaults to 30s. | +| [RenewalCadence(TimeSpan)](AzureBlobLeaseOptionsBuilder.RenewalCadence./x+hnazpWWqAWeDDlrJmTg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.RenewalCadence(System.TimeSpan)') | Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests
but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in
before the lease duration expires.

To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')

Defaults to 1/3 of the specified lease duration (may be infinite). | diff --git a/docs/api/DistributedLock.Azure/Medallion.Threading.Azure.md b/docs/api/DistributedLock.Azure/Medallion.Threading.Azure.md new file mode 100644 index 00000000..01af2e9c --- /dev/null +++ b/docs/api/DistributedLock.Azure/Medallion.Threading.Azure.md @@ -0,0 +1,10 @@ +#### [DistributedLock.Azure](README.md 'README') + +## Medallion.Threading.Azure Namespace + +| Classes | | +| :--- | :--- | +| [AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') | Implements a [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on Azure blob leases | +| [AzureBlobLeaseDistributedLockHandle](AzureBlobLeaseDistributedLockHandle.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [AzureBlobLeaseDistributedSynchronizationProvider](AzureBlobLeaseDistributedSynchronizationProvider.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [AzureBlobLeaseDistributedLock](AzureBlobLeaseDistributedLock.md 'Medallion.Threading.Azure.AzureBlobLeaseDistributedLock') | +| [AzureBlobLeaseOptionsBuilder](AzureBlobLeaseOptionsBuilder.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder') | Specifies options for an Azure blob lease | diff --git a/docs/api/DistributedLock.Azure/README.md b/docs/api/DistributedLock.Azure/README.md new file mode 100644 index 00000000..88cb1bf1 --- /dev/null +++ b/docs/api/DistributedLock.Azure/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.Azure](README.md 'README') + +## DistributedLock.Azure Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.Azure](Medallion.Threading.Azure.md 'Medallion.Threading.Azure') | | diff --git a/docs/api/DistributedLock.Core/DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md b/docs/api/DistributedLock.Core/DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md new file mode 100644 index 00000000..ffc3d094 --- /dev/null +++ b/docs/api/DistributedLock.Core/DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') + +## DeadlockException(string, Exception) Constructor + +Constructs an instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with the given [message](DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md#Medallion.Threading.DeadlockException.DeadlockException(string,System.Exception).message 'Medallion.Threading.DeadlockException.DeadlockException(string, System.Exception).message') and [innerException](DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md#Medallion.Threading.DeadlockException.DeadlockException(string,System.Exception).innerException 'Medallion.Threading.DeadlockException.DeadlockException(string, System.Exception).innerException') + +```csharp +public DeadlockException(string message, System.Exception innerException); +``` +#### Parameters + + + +`message` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`innerException` [System.Exception](https://docs.microsoft.com/en-us/dotnet/api/System.Exception 'System.Exception') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md b/docs/api/DistributedLock.Core/DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md new file mode 100644 index 00000000..df577758 --- /dev/null +++ b/docs/api/DistributedLock.Core/DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') + +## DeadlockException(string) Constructor + +Constructs an instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with the given [message](DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md#Medallion.Threading.DeadlockException.DeadlockException(string).message 'Medallion.Threading.DeadlockException.DeadlockException(string).message') + +```csharp +public DeadlockException(string message); +``` +#### Parameters + + + +`message` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DeadlockException.DeadlockException().md b/docs/api/DistributedLock.Core/DeadlockException.DeadlockException().md new file mode 100644 index 00000000..2c61a498 --- /dev/null +++ b/docs/api/DistributedLock.Core/DeadlockException.DeadlockException().md @@ -0,0 +1,10 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') + +## DeadlockException() Constructor + +Constructs a new instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with a default message + +```csharp +public DeadlockException(); +``` \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DeadlockException.md b/docs/api/DistributedLock.Core/DeadlockException.md new file mode 100644 index 00000000..ac26e7ec --- /dev/null +++ b/docs/api/DistributedLock.Core/DeadlockException.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## DeadlockException Class + +An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks +that throw this exception under some circumstances cannot detect ALL deadlock conditions + +```csharp +public sealed class DeadlockException : System.InvalidOperationException +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 [System.Exception](https://docs.microsoft.com/en-us/dotnet/api/System.Exception 'System.Exception') 🡒 [System.SystemException](https://docs.microsoft.com/en-us/dotnet/api/System.SystemException 'System.SystemException') 🡒 [System.InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/System.InvalidOperationException 'System.InvalidOperationException') 🡒 DeadlockException + +| Constructors | | +| :--- | :--- | +| [DeadlockException()](DeadlockException.DeadlockException().md 'Medallion.Threading.DeadlockException.DeadlockException()') | Constructs a new instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with a default message | +| [DeadlockException(string, Exception)](DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md 'Medallion.Threading.DeadlockException.DeadlockException(string, System.Exception)') | Constructs an instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with the given [message](DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md#Medallion.Threading.DeadlockException.DeadlockException(string,System.Exception).message 'Medallion.Threading.DeadlockException.DeadlockException(string, System.Exception).message') and [innerException](DeadlockException..ctor.7kv3RcT81RlRFP35V3Vh0w.md#Medallion.Threading.DeadlockException.DeadlockException(string,System.Exception).innerException 'Medallion.Threading.DeadlockException.DeadlockException(string, System.Exception).innerException') | +| [DeadlockException(string)](DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md 'Medallion.Threading.DeadlockException.DeadlockException(string)') | Constructs an instance of [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') with the given [message](DeadlockException..ctor.rZAayxV0jwI4ZmlNNiyAyQ.md#Medallion.Threading.DeadlockException.DeadlockException(string).message 'Medallion.Threading.DeadlockException.DeadlockException(string).message') | diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md new file mode 100644 index 00000000..eb3e6afd --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') + +## DistributedLockProviderExtensions.AcquireLock(this IDistributedLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle AcquireLock(this Medallion.Threading.IDistributedLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md new file mode 100644 index 00000000..ca816530 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') + +## DistributedLockProviderExtensions.AcquireLockAsync(this IDistributedLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask AcquireLockAsync(this Medallion.Threading.IDistributedLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md new file mode 100644 index 00000000..aa88027a --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') + +## DistributedLockProviderExtensions.TryAcquireLock(this IDistributedLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +[TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireLock(this Medallion.Threading.IDistributedLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md new file mode 100644 index 00000000..3363f0f4 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') + +## DistributedLockProviderExtensions.TryAcquireLockAsync(this IDistributedLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask TryAcquireLockAsync(this Medallion.Threading.IDistributedLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md new file mode 100644 index 00000000..8f6c7e55 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## DistributedLockProviderExtensions Class + +Productivity helper methods for [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + +```csharp +public static class DistributedLockProviderExtensions +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 DistributedLockProviderExtensions + +| Methods | | +| :--- | :--- | +| [AcquireLock(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireLockAsync(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireLock(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireLockAsync(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md new file mode 100644 index 00000000..63b82304 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.AcquireReadLock(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle AcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md new file mode 100644 index 00000000..369b0626 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask AcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md new file mode 100644 index 00000000..1a64d81d --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.AcquireWriteLock(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle AcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md new file mode 100644 index 00000000..074b5234 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask AcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md new file mode 100644 index 00000000..71de5a88 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md new file mode 100644 index 00000000..fd01bf83 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md new file mode 100644 index 00000000..7be2d08a --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md new file mode 100644 index 00000000..17ba428b --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') + +## DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +[TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md new file mode 100644 index 00000000..e6b3568a --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## DistributedReaderWriterLockProviderExtensions Class + +Productivity helper methods for [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + +```csharp +public static class DistributedReaderWriterLockProviderExtensions +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 DistributedReaderWriterLockProviderExtensions + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireWriteLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireReadLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireWriteLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md new file mode 100644 index 00000000..ccfa92ae --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') + +## DistributedSemaphoreProviderExtensions.AcquireSemaphore(this IDistributedSemaphoreProvider, string, int, Nullable, CancellationToken) Method + +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle AcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider provider, string name, int maxCount, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md new file mode 100644 index 00000000..9ec884ee --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') + +## DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, Nullable, CancellationToken) Method + +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask AcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider provider, string name, int maxCount, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md new file mode 100644 index 00000000..d0cdb210 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') + +## DistributedSemaphoreProviderExtensions.TryAcquireSemaphore(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +[TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider provider, string name, int maxCount, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md new file mode 100644 index 00000000..91578902 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') + +## DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask TryAcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider provider, string name, int maxCount, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md new file mode 100644 index 00000000..e8d56d73 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## DistributedSemaphoreProviderExtensions Class + +Productivity helper methods for [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +```csharp +public static class DistributedSemaphoreProviderExtensions +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 DistributedSemaphoreProviderExtensions + +| Methods | | +| :--- | :--- | +| [AcquireSemaphore(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireSemaphore(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md new file mode 100644 index 00000000..c052805a --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedUpgradeableReaderWriterLockProviderExtensions](DistributedUpgradeableReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions') + +## DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +[AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedLockUpgradeableHandle AcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md new file mode 100644 index 00000000..c73da700 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedUpgradeableReaderWriterLockProviderExtensions](DistributedUpgradeableReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions') + +## DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable, CancellationToken) Method + +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +[AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask AcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider provider, string name, System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md new file mode 100644 index 00000000..fb45358d --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedUpgradeableReaderWriterLockProviderExtensions](DistributedUpgradeableReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions') + +## DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +[TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static Medallion.Threading.IDistributedLockUpgradeableHandle? TryAcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md new file mode 100644 index 00000000..a47ebbf1 --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[DistributedUpgradeableReaderWriterLockProviderExtensions](DistributedUpgradeableReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions') + +## DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method + +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +[TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). + +```csharp +public static System.Threading.Tasks.ValueTask TryAcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider provider, string name, System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`provider` [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md new file mode 100644 index 00000000..52a9bdff --- /dev/null +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## DistributedUpgradeableReaderWriterLockProviderExtensions Class + +Productivity helper methods for [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + +```csharp +public static class DistributedUpgradeableReaderWriterLockProviderExtensions +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 DistributedUpgradeableReaderWriterLockProviderExtensions + +| Methods | | +| :--- | :--- | +| [AcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md b/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md new file mode 100644 index 00000000..427b82de --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +## IDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md b/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md new file mode 100644 index 00000000..68334701 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +## IDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLock.Name.md b/docs/api/DistributedLock.Core/IDistributedLock.Name.md new file mode 100644 index 00000000..129e5da5 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +## IDistributedLock.Name Property + +A name that uniquely identifies the lock + +```csharp +string Name { get; } +``` + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md new file mode 100644 index 00000000..3b3b567b --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +## IDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md new file mode 100644 index 00000000..b0048bc5 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +## IDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLock.md b/docs/api/DistributedLock.Core/IDistributedLock.md new file mode 100644 index 00000000..1424eeb0 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLock.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedLock Interface + +A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code +across processes or systems. The scope and capabilities of the lock are dependent on the particular implementation + +```csharp +public interface IDistributedLock +``` + +| Properties | | +| :--- | :--- | +| [Name](IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | A name that uniquely identifies the lock | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md b/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md new file mode 100644 index 00000000..ce7ad892 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + +## IDistributedLockProvider.CreateLock(string) Method + +Constructs an [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instance with the given [name](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md#Medallion.Threading.IDistributedLockProvider.CreateLock(string).name 'Medallion.Threading.IDistributedLockProvider.CreateLock(string).name'). + +```csharp +Medallion.Threading.IDistributedLock CreateLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +#### Returns +[IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLockProvider.md b/docs/api/DistributedLock.Core/IDistributedLockProvider.md new file mode 100644 index 00000000..ea4311fc --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockProvider.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedLockProvider Interface + +Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be +easier to use than [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') in dependency injection scenarios. + +```csharp +public interface IDistributedLockProvider +``` + +| Methods | | +| :--- | :--- | +| [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') | Constructs an [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instance with the given [name](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md#Medallion.Threading.IDistributedLockProvider.CreateLock(string).name 'Medallion.Threading.IDistributedLockProvider.CreateLock(string).name'). | diff --git a/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md new file mode 100644 index 00000000..2238363a --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +## IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(TimeSpan, CancellationToken) Method + +Attempts to upgrade a WRITE lock synchronously. Not compatible with another WRITE lock or a UPGRADE lock + +```csharp +bool TryUpgradeToWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md new file mode 100644 index 00000000..74643d87 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +## IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to upgrade a WRITE lock asynchronously. Not compatible with another WRITE lock or a UPGRADE lock + +```csharp +System.Threading.Tasks.ValueTask TryUpgradeToWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md new file mode 100644 index 00000000..50e7291b --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +## IDistributedLockUpgradeableHandle.UpgradeToWriteLock(Nullable, CancellationToken) Method + +Upgrades to a WRITE lock synchronously. Not compatible with another WRITE lock or a UPGRADE lock + +```csharp +void UpgradeToWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md new file mode 100644 index 00000000..a9674a1a --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +## IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(Nullable, CancellationToken) Method + +Upgrades to a WRITE lock asynchronously. Not compatible with another WRITE lock or a UPGRADE lock + +```csharp +System.Threading.Tasks.ValueTask UpgradeToWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md new file mode 100644 index 00000000..7080b127 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedLockUpgradeableHandle Interface + +A [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') that can be upgraded to a write lock + +```csharp +public interface IDistributedLockUpgradeableHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Implements [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Methods | | +| :--- | :--- | +| [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to upgrade a WRITE lock synchronously. Not compatible with another WRITE lock or a UPGRADE lock | +| [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to upgrade a WRITE lock asynchronously. Not compatible with another WRITE lock or a UPGRADE lock | +| [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable, System.Threading.CancellationToken)') | Upgrades to a WRITE lock synchronously. Not compatible with another WRITE lock or a UPGRADE lock | +| [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Upgrades to a WRITE lock asynchronously. Not compatible with another WRITE lock or a UPGRADE lock | diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md new file mode 100644 index 00000000..ac86e387 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method + +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle AcquireReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md new file mode 100644 index 00000000..0af1e98a --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md new file mode 100644 index 00000000..8e4e9137 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method + +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle AcquireWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md new file mode 100644 index 00000000..cf7505e0 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md new file mode 100644 index 00000000..7d99edda --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.Name Property + +A name that uniquely identifies the lock + +```csharp +string Name { get; } +``` + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md new file mode 100644 index 00000000..1b40ca85 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md new file mode 100644 index 00000000..f55c73e4 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md new file mode 100644 index 00000000..a770d330 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle? TryAcquireWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md new file mode 100644 index 00000000..b4016416 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +## IDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md new file mode 100644 index 00000000..ed747865 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md @@ -0,0 +1,28 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedReaderWriterLock Interface + +Provides distributed locking functionality comparable to [System.Threading.ReaderWriterLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLock 'System.Threading.ReaderWriterLock') + +```csharp +public interface IDistributedReaderWriterLock +``` + +Derived +↳ [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') + +| Properties | | +| :--- | :--- | +| [Name](IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') | A name that uniquely identifies the lock | + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md new file mode 100644 index 00000000..66bddf4c --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + +## IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string) Method + +Constructs an [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instance with the given [name](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md#Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string).name'). + +```csharp +Medallion.Threading.IDistributedReaderWriterLock CreateReaderWriterLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +#### Returns +[IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md new file mode 100644 index 00000000..013efa09 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedReaderWriterLockProvider Interface + +Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be +easier to use than [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') in dependency injection scenarios. + +```csharp +public interface IDistributedReaderWriterLockProvider +``` + +Derived +↳ [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + +| Methods | | +| :--- | :--- | +| [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') | Constructs an [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instance with the given [name](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md#Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string).name'). | diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md new file mode 100644 index 00000000..99790d60 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.Acquire(Nullable, CancellationToken) Method + +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md new file mode 100644 index 00000000..4e3d53ad --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method + +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md new file mode 100644 index 00000000..de86f37e --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md @@ -0,0 +1,14 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.MaxCount Property + +The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire +the semaphore concurrently). + +```csharp +int MaxCount { get; } +``` + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md new file mode 100644 index 00000000..0709872c --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.Name Property + +A name that uniquely identifies the semaphore + +```csharp +string Name { get; } +``` + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md new file mode 100644 index 00000000..b6d52a2c --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +Medallion.Threading.IDistributedSynchronizationHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md new file mode 100644 index 00000000..252d7d28 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +## IDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.md new file mode 100644 index 00000000..cd157678 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedSemaphore Interface + +A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes. +Compare to [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore'). + +```csharp +public interface IDistributedSemaphore +``` + +| Properties | | +| :--- | :--- | +| [MaxCount](IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire
the semaphore concurrently). | +| [Name](IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') | A name that uniquely identifies the semaphore | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md new file mode 100644 index 00000000..c113d66c --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +## IDistributedSemaphoreProvider.CreateSemaphore(string, int) Method + +Constructs an [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instance with the given [name](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md#Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string,int).name 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int).name'). + +```csharp +Medallion.Threading.IDistributedSemaphore CreateSemaphore(string name, int maxCount); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + +#### Returns +[IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md new file mode 100644 index 00000000..562a69db --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedSemaphoreProvider Interface + +Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be +easier to use than [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') in dependency injection scenarios. + +```csharp +public interface IDistributedSemaphoreProvider +``` + +| Methods | | +| :--- | :--- | +| [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') | Constructs an [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instance with the given [name](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md#Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string,int).name 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int).name'). | diff --git a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md new file mode 100644 index 00000000..2a95b95d --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +## IDistributedSynchronizationHandle.HandleLostToken Property + +Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to +monitor whether the handle to the lock is lost before the handle is +disposed. + +For example, this could happen if the lock is backed by a +database and the connection to the database is disrupted. + +Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None') +which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled'). + +For lock types that do support this, accessing this property may incur additional +costs, such as polling to detect connectivity loss. + +```csharp +System.Threading.CancellationToken HandleLostToken { get; } +``` + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md new file mode 100644 index 00000000..e3c49a24 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedSynchronizationHandle Interface + +A handle to a distributed lock or other synchronization primitive. To unlock/release, +simply dispose the handle. + +```csharp +public interface IDistributedSynchronizationHandle : +System.IDisposable, +System.IAsyncDisposable +``` + +Derived +↳ [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to
monitor whether the handle to the lock is lost before the handle is
disposed.

For example, this could happen if the lock is backed by a
database and the connection to the database is disrupted.

Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None')
which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled').

For lock types that do support this, accessing this property may incur additional
costs, such as polling to detect connectivity loss. | diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md new file mode 100644 index 00000000..3b87d44e --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') + +## IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +Medallion.Threading.IDistributedLockUpgradeableHandle AcquireUpgradeableReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') +An [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md new file mode 100644 index 00000000..f77b660b --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') + +## IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +System.Threading.Tasks.ValueTask AcquireUpgradeableReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md new file mode 100644 index 00000000..84b107cc --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') + +## IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +Medallion.Threading.IDistributedLockUpgradeableHandle? TryAcquireUpgradeableReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') +An [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md new file mode 100644 index 00000000..e342a84a --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') + +## IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +System.Threading.Tasks.ValueTask TryAcquireUpgradeableReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md new file mode 100644 index 00000000..40d970de --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedUpgradeableReaderWriterLock Interface + +Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock +allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write +lock without releasing the underlying handle. + +```csharp +public interface IDistributedUpgradeableReaderWriterLock : +Medallion.Threading.IDistributedReaderWriterLock +``` + +Implements [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Methods | | +| :--- | :--- | +| [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md new file mode 100644 index 00000000..17e743e2 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading').[IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') + +## IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string) Method + +Constructs an [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instance with the given [name](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md#Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string).name 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string).name'). + +```csharp +Medallion.Threading.IDistributedUpgradeableReaderWriterLock CreateUpgradeableReaderWriterLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +#### Returns +[IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md new file mode 100644 index 00000000..964c9678 --- /dev/null +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Core](README.md 'README') +### [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') + +## IDistributedUpgradeableReaderWriterLockProvider Interface + +Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be +easier to use than [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') in dependency injection scenarios. + +```csharp +public interface IDistributedUpgradeableReaderWriterLockProvider : +Medallion.Threading.IDistributedReaderWriterLockProvider +``` + +Implements [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + +| Methods | | +| :--- | :--- | +| [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') | Constructs an [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instance with the given [name](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md#Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string).name 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string).name'). | diff --git a/docs/api/DistributedLock.Core/Medallion.Threading.md b/docs/api/DistributedLock.Core/Medallion.Threading.md new file mode 100644 index 00000000..41e4ce03 --- /dev/null +++ b/docs/api/DistributedLock.Core/Medallion.Threading.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Core](README.md 'README') + +## Medallion.Threading Namespace + +| Classes | | +| :--- | :--- | +| [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') | An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks
that throw this exception under some circumstances cannot detect ALL deadlock conditions | +| [DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') | Productivity helper methods for [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') | +| [DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') | Productivity helper methods for [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') | +| [DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') | Productivity helper methods for [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') | +| [DistributedUpgradeableReaderWriterLockProviderExtensions](DistributedUpgradeableReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions') | Productivity helper methods for [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') | + +| Interfaces | | +| :--- | :--- | +| [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') | A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code
across processes or systems. The scope and capabilities of the lock are dependent on the particular implementation | +| [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') | Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be
easier to use than [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') in dependency injection scenarios. | +| [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | A [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') that can be upgraded to a write lock | +| [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') | Provides distributed locking functionality comparable to [System.Threading.ReaderWriterLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLock 'System.Threading.ReaderWriterLock') | +| [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') | Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be
easier to use than [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') in dependency injection scenarios. | +| [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') | A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes.
Compare to [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore'). | +| [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') | Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be
easier to use than [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') in dependency injection scenarios. | +| [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | A handle to a distributed lock or other synchronization primitive. To unlock/release,
simply dispose the handle. | +| [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') | Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock
allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write
lock without releasing the underlying handle. | +| [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') | Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be
easier to use than [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') in dependency injection scenarios. | diff --git a/docs/api/DistributedLock.Core/README.md b/docs/api/DistributedLock.Core/README.md new file mode 100644 index 00000000..416419f7 --- /dev/null +++ b/docs/api/DistributedLock.Core/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.Core](README.md 'README') + +## DistributedLock.Core Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') | | diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md new file mode 100644 index 00000000..43c48fa3 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md @@ -0,0 +1,23 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock(DirectoryInfo, string) Constructor + +Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name +will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced. + +Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file +will similarly be created if it does not already exist, and will be deleted when the lock is released. + +```csharp +public FileDistributedLock(System.IO.DirectoryInfo lockFileDirectory, string name); +``` +#### Parameters + + + +`lockFileDirectory` [System.IO.DirectoryInfo](https://docs.microsoft.com/en-us/dotnet/api/System.IO.DirectoryInfo 'System.IO.DirectoryInfo') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md new file mode 100644 index 00000000..b6505561 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md @@ -0,0 +1,18 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock(FileInfo) Constructor + +Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name. + +Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file +will similarly be created if it does not already exist, and will be deleted when the lock is released. + +```csharp +public FileDistributedLock(System.IO.FileInfo lockFile); +``` +#### Parameters + + + +`lockFile` [System.IO.FileInfo](https://docs.microsoft.com/en-us/dotnet/api/System.IO.FileInfo 'System.IO.FileInfo') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md new file mode 100644 index 00000000..1225c270 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.FileSystem.FileDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') +A [FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md new file mode 100644 index 00000000..687f15f2 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.Name.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Name.md new file mode 100644 index 00000000..ed0fa14f --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md new file mode 100644 index 00000000..595ee888 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.FileSystem.FileDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') +A [FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md new file mode 100644 index 00000000..18b74f10 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +## FileDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.md new file mode 100644 index 00000000..4c795760 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.md @@ -0,0 +1,31 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem') + +## FileDistributedLock Class + +A distributed lock based on holding an exclusive handle to a lock file. The file will be deleted when the lock is released. + +```csharp +public sealed class FileDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 FileDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [FileDistributedLock(DirectoryInfo, string)](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string)') | Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name
will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced.

Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file
will similarly be created if it does not already exist, and will be deleted when the lock is released. | +| [FileDistributedLock(FileInfo)](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo)') | Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name.

Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file
will similarly be created if it does not already exist, and will be deleted when the lock is released. | + +| Properties | | +| :--- | :--- | +| [Name](FileDistributedLock.Name.md 'Medallion.Threading.FileSystem.FileDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md 'Medallion.Threading.FileSystem.FileDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md 'Medallion.Threading.FileSystem.FileDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md 'Medallion.Threading.FileSystem.FileDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..028fdd50 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') + +## FileDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..d5fbc129 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') + +## FileDistributedLockHandle.DisposeAsync() Method + +Releases the lock + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.md b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.md new file mode 100644 index 00000000..07e80991 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLockHandle.md @@ -0,0 +1,22 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem') + +## FileDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class FileDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 FileDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Methods | | +| :--- | :--- | +| [Dispose()](FileDistributedLockHandle.Dispose().md 'Medallion.Threading.FileSystem.FileDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](FileDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.FileSystem.FileDistributedLockHandle.DisposeAsync()') | Releases the lock | diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md new file mode 100644 index 00000000..a0b75918 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md @@ -0,0 +1,15 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedSynchronizationProvider](FileDistributedSynchronizationProvider.md 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider') + +## FileDistributedSynchronizationProvider(DirectoryInfo) Constructor + +Constructs a provider that scopes lock files within the provided [lockFileDirectory](FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md#Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.FileDistributedSynchronizationProvider(System.IO.DirectoryInfo).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.FileDistributedSynchronizationProvider(System.IO.DirectoryInfo).lockFileDirectory'). + +```csharp +public FileDistributedSynchronizationProvider(System.IO.DirectoryInfo lockFileDirectory); +``` +#### Parameters + + + +`lockFileDirectory` [System.IO.DirectoryInfo](https://docs.microsoft.com/en-us/dotnet/api/System.IO.DirectoryInfo 'System.IO.DirectoryInfo') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md new file mode 100644 index 00000000..ef2e84e8 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md @@ -0,0 +1,20 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem').[FileDistributedSynchronizationProvider](FileDistributedSynchronizationProvider.md 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider') + +## FileDistributedSynchronizationProvider.CreateLock(string) Method + +Constructs a [FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') with the given [name](FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md#Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.CreateLock(string).name'). + +```csharp +public Medallion.Threading.FileSystem.FileDistributedLock CreateLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +Implements [CreateLock(string)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(System.String)') + +#### Returns +[FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.md b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.md new file mode 100644 index 00000000..fbe7a8bb --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/FileDistributedSynchronizationProvider.md @@ -0,0 +1,23 @@ +#### [DistributedLock.FileSystem](README.md 'README') +### [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem') + +## FileDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') + +```csharp +public sealed class FileDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 FileDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + +| Constructors | | +| :--- | :--- | +| [FileDistributedSynchronizationProvider(DirectoryInfo)](FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.FileDistributedSynchronizationProvider(System.IO.DirectoryInfo)') | Constructs a provider that scopes lock files within the provided [lockFileDirectory](FileDistributedSynchronizationProvider..ctor.TETT6F6M/CskpBpX2hNqtA.md#Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.FileDistributedSynchronizationProvider(System.IO.DirectoryInfo).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.FileDistributedSynchronizationProvider(System.IO.DirectoryInfo).lockFileDirectory'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string)](FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.CreateLock(string)') | Constructs a [FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') with the given [name](FileDistributedSynchronizationProvider.CreateLock.bu/BmarBn5NPtnEydKr3pQ.md#Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider.CreateLock(string).name'). | diff --git a/docs/api/DistributedLock.FileSystem/Medallion.Threading.FileSystem.md b/docs/api/DistributedLock.FileSystem/Medallion.Threading.FileSystem.md new file mode 100644 index 00000000..8e31121b --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/Medallion.Threading.FileSystem.md @@ -0,0 +1,9 @@ +#### [DistributedLock.FileSystem](README.md 'README') + +## Medallion.Threading.FileSystem Namespace + +| Classes | | +| :--- | :--- | +| [FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') | A distributed lock based on holding an exclusive handle to a lock file. The file will be deleted when the lock is released. | +| [FileDistributedLockHandle](FileDistributedLockHandle.md 'Medallion.Threading.FileSystem.FileDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [FileDistributedSynchronizationProvider](FileDistributedSynchronizationProvider.md 'Medallion.Threading.FileSystem.FileDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [FileDistributedLock](FileDistributedLock.md 'Medallion.Threading.FileSystem.FileDistributedLock') | diff --git a/docs/api/DistributedLock.FileSystem/README.md b/docs/api/DistributedLock.FileSystem/README.md new file mode 100644 index 00000000..af21cc86 --- /dev/null +++ b/docs/api/DistributedLock.FileSystem/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.FileSystem](README.md 'README') + +## DistributedLock.FileSystem Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.FileSystem](Medallion.Threading.FileSystem.md 'Medallion.Threading.FileSystem') | | diff --git a/docs/api/DistributedLock.MySql/Medallion.Threading.MySql.md b/docs/api/DistributedLock.MySql/Medallion.Threading.MySql.md new file mode 100644 index 00000000..a77d9287 --- /dev/null +++ b/docs/api/DistributedLock.MySql/Medallion.Threading.MySql.md @@ -0,0 +1,10 @@ +#### [DistributedLock.MySql](README.md 'README') + +## Medallion.Threading.MySql Namespace + +| Classes | | +| :--- | :--- | +| [MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder') | Specifies options for connecting to and locking against a MySQL database | +| [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') | Implements a distributed lock for MySQL or MariaDB based on the GET_LOCK family of functions | +| [MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [MySqlDistributedSynchronizationProvider](MySqlDistributedSynchronizationProvider.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') | diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md new file mode 100644 index 00000000..d721da0f --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md @@ -0,0 +1,25 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder') + +## MySqlConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method + +MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it. +For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. + +Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours. + +Setting a value of [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') disables keepalive. + +```csharp +public Medallion.Threading.MySql.MySqlConnectionOptionsBuilder KeepaliveCadence(System.TimeSpan keepaliveCadence); +``` +#### Parameters + + + +`keepaliveCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md new file mode 100644 index 00000000..274d353d --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md @@ -0,0 +1,31 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder') + +## MySqlConnectionOptionsBuilder.UseMultiplexing(bool) Method + +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +semantics are used with a zero-length timeout. + +```csharp +public Medallion.Threading.MySql.MySqlConnectionOptionsBuilder UseMultiplexing(bool useMultiplexing=true); +``` +#### Parameters + + + +`useMultiplexing` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md new file mode 100644 index 00000000..2c503b8d --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md @@ -0,0 +1,17 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql') + +## MySqlConnectionOptionsBuilder Class + +Specifies options for connecting to and locking against a MySQL database + +```csharp +public sealed class MySqlConnectionOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 MySqlConnectionOptionsBuilder + +| Methods | | +| :--- | :--- | +| [KeepaliveCadence(TimeSpan)](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it.
For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.

Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours.

Setting a value of [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') disables keepalive. | +| [UseMultiplexing(bool)](MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md new file mode 100644 index 00000000..7f5c3900 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md @@ -0,0 +1,28 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock(string, IDbTransaction, bool) Constructor + +Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction'). + +NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends. +However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection. + +Unless [exactName](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public MySqlDistributedLock(string name, System.Data.IDbTransaction transaction, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md new file mode 100644 index 00000000..e5dfade0 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md @@ -0,0 +1,25 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock(string, IDbConnection, bool) Constructor + +Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection'). + +Unless [exactName](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public MySqlDistributedLock(string name, System.Data.IDbConnection connection, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md new file mode 100644 index 00000000..93a7146b --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md @@ -0,0 +1,30 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock(string, string, Action, bool) Constructor + +Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and +[options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options'). + +Unless [exactName](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public MySqlDistributedLock(string name, string connectionString, System.Action? options=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md new file mode 100644 index 00000000..9623669e --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.MySql.MySqlDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') +A [MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md new file mode 100644 index 00000000..689f2eae --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.Name.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Name.md new file mode 100644 index 00000000..c385e7d4 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md new file mode 100644 index 00000000..b29c4ff3 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md @@ -0,0 +1,37 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.MySql.MySqlDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') +A [MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md new file mode 100644 index 00000000..6c456475 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md @@ -0,0 +1,37 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +## MySqlDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.md new file mode 100644 index 00000000..11503177 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.md @@ -0,0 +1,32 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql') + +## MySqlDistributedLock Class + +Implements a distributed lock for MySQL or MariaDB based on the GET_LOCK family of functions + +```csharp +public sealed class MySqlDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 MySqlDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [MySqlDistributedLock(string, string, Action<MySqlConnectionOptionsBuilder>, bool)](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and
[options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options').

Unless [exactName](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [MySqlDistributedLock(string, IDbConnection, bool)](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection').

Unless [exactName](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [MySqlDistributedLock(string, IDbTransaction, bool)](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction').

NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends.
However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection.

Unless [exactName](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](MySqlDistributedLock.Name.md 'Medallion.Threading.MySql.MySqlDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md 'Medallion.Threading.MySql.MySqlDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md 'Medallion.Threading.MySql.MySqlDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md 'Medallion.Threading.MySql.MySqlDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md 'Medallion.Threading.MySql.MySqlDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..519e28a1 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') + +## MySqlDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..fd822106 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') + +## MySqlDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..4ae9f02f --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedLockHandle](MySqlDistributedLockHandle.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle') + +## MySqlDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.md b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.md new file mode 100644 index 00000000..84c60c41 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql') + +## MySqlDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class MySqlDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 MySqlDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](MySqlDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.MySql.MySqlDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](MySqlDistributedLockHandle.Dispose().md 'Medallion.Threading.MySql.MySqlDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](MySqlDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.MySql.MySqlDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md new file mode 100644 index 00000000..8cfc4764 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md @@ -0,0 +1,15 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedSynchronizationProvider](MySqlDistributedSynchronizationProvider.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider') + +## MySqlDistributedSynchronizationProvider(IDbTransaction) Constructor + +Constructs a provider that connects with [transaction](MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction'). + +```csharp +public MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction transaction); +``` +#### Parameters + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md new file mode 100644 index 00000000..42e95bd4 --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md @@ -0,0 +1,15 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedSynchronizationProvider](MySqlDistributedSynchronizationProvider.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider') + +## MySqlDistributedSynchronizationProvider(IDbConnection) Constructor + +Constructs a provider that connects with [connection](MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). + +```csharp +public MySqlDistributedSynchronizationProvider(System.Data.IDbConnection connection); +``` +#### Parameters + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor/nOe7Is6T7o1EV/QK7Yew.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor/nOe7Is6T7o1EV/QK7Yew.md new file mode 100644 index 00000000..99c21b1d --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider..ctor/nOe7Is6T7o1EV/QK7Yew.md @@ -0,0 +1,19 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedSynchronizationProvider](MySqlDistributedSynchronizationProvider.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider') + +## MySqlDistributedSynchronizationProvider(string, Action) Constructor + +Constructs a provider that connects with [connectionString](MySqlDistributedSynchronizationProvider..ctor.//nOe7Is6T7o1EV/QK7Yew.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](MySqlDistributedSynchronizationProvider..ctor.//nOe7Is6T7o1EV/QK7Yew.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_).options 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string, System.Action).options'). + +```csharp +public MySqlDistributedSynchronizationProvider(string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[MySqlConnectionOptionsBuilder](MySqlConnectionOptionsBuilder.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md new file mode 100644 index 00000000..ddf9f4bf --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md @@ -0,0 +1,23 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql').[MySqlDistributedSynchronizationProvider](MySqlDistributedSynchronizationProvider.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider') + +## MySqlDistributedSynchronizationProvider.CreateLock(string, bool) Method + +Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +is specified, invalid names will be escaped/hashed. + +```csharp +public Medallion.Threading.MySql.MySqlDistributedLock CreateLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md new file mode 100644 index 00000000..1babcdcf --- /dev/null +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md @@ -0,0 +1,25 @@ +#### [DistributedLock.MySql](README.md 'README') +### [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql') + +## MySqlDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') + +```csharp +public sealed class MySqlDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 MySqlDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') + +| Constructors | | +| :--- | :--- | +| [MySqlDistributedSynchronizationProvider(string, Action<MySqlConnectionOptionsBuilder>)](MySqlDistributedSynchronizationProvider..ctor.//nOe7Is6T7o1EV/QK7Yew.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider that connects with [connectionString](MySqlDistributedSynchronizationProvider..ctor.//nOe7Is6T7o1EV/QK7Yew.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](MySqlDistributedSynchronizationProvider..ctor.//nOe7Is6T7o1EV/QK7Yew.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_).options 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(string, System.Action).options'). | +| [MySqlDistributedSynchronizationProvider(IDbConnection)](MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbConnection)') | Constructs a provider that connects with [connection](MySqlDistributedSynchronizationProvider..ctor.pke77kyAr68Nsic0RCNm1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). | +| [MySqlDistributedSynchronizationProvider(IDbTransaction)](MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction)') | Constructs a provider that connects with [transaction](MySqlDistributedSynchronizationProvider..ctor.p7z4Ra8yKm8ddj1YbCV32w.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.MySqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string, bool)](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.MySql/README.md b/docs/api/DistributedLock.MySql/README.md new file mode 100644 index 00000000..e89e09f3 --- /dev/null +++ b/docs/api/DistributedLock.MySql/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.MySql](README.md 'README') + +## DistributedLock.MySql Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.MySql](Medallion.Threading.MySql.md 'Medallion.Threading.MySql') | | diff --git a/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md b/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md new file mode 100644 index 00000000..86367d80 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Oracle](README.md 'README') + +## Medallion.Threading.Oracle Namespace + +| Classes | | +| :--- | :--- | +| [OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder') | Specifies options for connecting to and locking against an Oracle database | +| [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') | Implements a distributed lock for Oracle databse based on the DBMS_LOCK package | +| [OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') | Implements an upgradeable distributed reader-writer lock for the Oracle database using the DBMS_LOCK package. | +| [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') | Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | +| [OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock')
and [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') | diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md new file mode 100644 index 00000000..d4c6d4fc --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder') + +## OracleConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method + +Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')). + +However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for +a long time, you can set a value for keepalive to prevent this from happening. + +See https://stackoverflow.com/questions/1966247/idle-timeout-parameter-in-oracle. + +```csharp +public Medallion.Threading.Oracle.OracleConnectionOptionsBuilder KeepaliveCadence(System.TimeSpan keepaliveCadence); +``` +#### Parameters + + + +`keepaliveCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md new file mode 100644 index 00000000..f17cb143 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder') + +## OracleConnectionOptionsBuilder.UseMultiplexing(bool) Method + +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +semantics are used with a zero-length timeout. + +```csharp +public Medallion.Threading.Oracle.OracleConnectionOptionsBuilder UseMultiplexing(bool useMultiplexing=true); +``` +#### Parameters + + + +`useMultiplexing` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md new file mode 100644 index 00000000..13289e1a --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md @@ -0,0 +1,17 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleConnectionOptionsBuilder Class + +Specifies options for connecting to and locking against an Oracle database + +```csharp +public sealed class OracleConnectionOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleConnectionOptionsBuilder + +| Methods | | +| :--- | :--- | +| [KeepaliveCadence(TimeSpan)](OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')).

However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for
a long time, you can set a value for keepalive to prevent this from happening.

See https://stackoverflow.com/questions/1966247/idle-timeout-parameter-in-oracle. | +| [UseMultiplexing(bool)](OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md new file mode 100644 index 00000000..b5e331dd --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md @@ -0,0 +1,30 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock(string, string, Action, bool) Constructor + +Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and +[options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options'). + +Unless [exactName](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public OracleDistributedLock(string name, string connectionString, System.Action? options=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md new file mode 100644 index 00000000..b2b9caf8 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md @@ -0,0 +1,25 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock(string, IDbConnection, bool) Constructor + +Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection'). + +Unless [exactName](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public OracleDistributedLock(string name, System.Data.IDbConnection connection, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md new file mode 100644 index 00000000..1871050c --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') +An [OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md new file mode 100644 index 00000000..5eb48991 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.Name.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Name.md new file mode 100644 index 00000000..7a2bdeb9 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md new file mode 100644 index 00000000..5dcb03fb --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') +An [OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md new file mode 100644 index 00000000..9a55caff --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') + +## OracleDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.md new file mode 100644 index 00000000..400874e3 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedLock Class + +Implements a distributed lock for Oracle databse based on the DBMS_LOCK package + +```csharp +public sealed class OracleDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [OracleDistributedLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and
[options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options').

Unless [exactName](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedLock(string, IDbConnection, bool)](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection').

Unless [exactName](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](OracleDistributedLock.Name.md 'Medallion.Threading.Oracle.OracleDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md 'Medallion.Threading.Oracle.OracleDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md 'Medallion.Threading.Oracle.OracleDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md 'Medallion.Threading.Oracle.OracleDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md 'Medallion.Threading.Oracle.OracleDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..42d911f6 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') + +## OracleDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..c91138fd --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') + +## OracleDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..7e8d3c6a --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedLockHandle](OracleDistributedLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle') + +## OracleDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.md b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.md new file mode 100644 index 00000000..c6e71550 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class OracleDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](OracleDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.Oracle.OracleDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](OracleDistributedLockHandle.Dispose().md 'Medallion.Threading.Oracle.OracleDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](OracleDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.Oracle.OracleDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md new file mode 100644 index 00000000..cd07ba3a --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock(string, string, Action, bool) Constructor + +Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name'). + +The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + +Unless [exactName](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public OracleDistributedReaderWriterLock(string name, string connectionString, System.Action? options=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md new file mode 100644 index 00000000..4b49f016 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md @@ -0,0 +1,28 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock(string, IDbConnection, bool) Constructor + +Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + +Unless [exactName](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public OracleDistributedReaderWriterLock(string name, System.Data.IDbConnection connection, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md new file mode 100644 index 00000000..ab4401a8 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method + +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle AcquireReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md new file mode 100644 index 00000000..d0ae850d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md new file mode 100644 index 00000000..ddd14b7d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle AcquireUpgradeableReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') +An [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md new file mode 100644 index 00000000..a46b22a9 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireUpgradeableReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md new file mode 100644 index 00000000..b433e238 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method + +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle AcquireWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md new file mode 100644 index 00000000..4f962744 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.Name.md new file mode 100644 index 00000000..40398a0f --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md new file mode 100644 index 00000000..a02393e8 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle? TryAcquireReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md new file mode 100644 index 00000000..8e70d9cd --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md new file mode 100644 index 00000000..e1a9bc6d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle? TryAcquireUpgradeableReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') +An [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md new file mode 100644 index 00000000..d4323d52 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireUpgradeableReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md new file mode 100644 index 00000000..a549cf3a --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle? TryAcquireWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md new file mode 100644 index 00000000..9b95c63d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +## OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md new file mode 100644 index 00000000..eca3f20a --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md @@ -0,0 +1,40 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedReaderWriterLock Class + +Implements an upgradeable distributed reader-writer lock for the Oracle database using the DBMS_LOCK package. + +```csharp +public sealed class OracleDistributedReaderWriterLock : +Medallion.Threading.IDistributedUpgradeableReaderWriterLock, +Medallion.Threading.IDistributedReaderWriterLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleDistributedReaderWriterLock + +Implements [IDistributedUpgradeableReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock'), [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Constructors | | +| :--- | :--- | +| [OracleDistributedReaderWriterLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name').

The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedReaderWriterLock(string, IDbConnection, bool)](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](OracleDistributedReaderWriterLock.Name.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLock(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21//n2EnWZfs+furVMXeXQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireWriteLock(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.Dispose().md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.Dispose().md new file mode 100644 index 00000000..cf848f09 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') + +## OracleDistributedReaderWriterLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.DisposeAsync().md new file mode 100644 index 00000000..7a69f104 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') + +## OracleDistributedReaderWriterLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public abstract System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.HandleLostToken.md new file mode 100644 index 00000000..91231bb5 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') + +## OracleDistributedReaderWriterLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public abstract System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.md new file mode 100644 index 00000000..b644fb91 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockHandle.md @@ -0,0 +1,29 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedReaderWriterLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public abstract class OracleDistributedReaderWriterLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleDistributedReaderWriterLockHandle + +Derived +↳ [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](OracleDistributedReaderWriterLockHandle.HandleLostToken.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](OracleDistributedReaderWriterLockHandle.Dispose().md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](OracleDistributedReaderWriterLockHandle.DisposeAsync().md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md new file mode 100644 index 00000000..e62a48d3 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public override System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md new file mode 100644 index 00000000..80a4156d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public override System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock/jHol+SIt7DlqMKC8v111g.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock/jHol+SIt7DlqMKC8v111g.md new file mode 100644 index 00000000..260ee3d2 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock/jHol+SIt7DlqMKC8v111g.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock(TimeSpan, CancellationToken) Method + +Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +```csharp +public bool TryUpgradeToWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md new file mode 100644 index 00000000..d209e812 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken) Method + +Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +```csharp +public System.Threading.Tasks.ValueTask TryUpgradeToWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md new file mode 100644 index 00000000..9b4e1fcd --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md @@ -0,0 +1,21 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock(Nullable, CancellationToken) Method + +Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +```csharp +public void UpgradeToWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md new file mode 100644 index 00000000..8708a12d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') + +## OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync(Nullable, CancellationToken) Method + +Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +```csharp +public System.Threading.Tasks.ValueTask UpgradeToWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.md new file mode 100644 index 00000000..bc846184 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLockUpgradeableHandle.md @@ -0,0 +1,30 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedReaderWriterLockUpgradeableHandle Class + +Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +```csharp +public sealed class OracleDistributedReaderWriterLockUpgradeableHandle : Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle, +Medallion.Threading.IDistributedLockUpgradeableHandle, +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') 🡒 OracleDistributedReaderWriterLockUpgradeableHandle + +Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle'), [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [DisposeAsync()](OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.DisposeAsync()') | Releases the lock asynchronously | +| [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock./jHol+SIt7DlqMKC8v111g.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') | +| [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.FgoBDmLlHiktYNvHXL6NPw.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') | +| [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.hWqwyiLC1304nrfXA65g6A.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable, System.Threading.CancellationToken)') | Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') | +| [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.NiMBlMvyOdtLajlwUeLO1Q.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md new file mode 100644 index 00000000..741ae486 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') + +## OracleDistributedSynchronizationProvider(string, Action) Constructor + +Constructs a provider that connects with [connectionString](OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_).options 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string, System.Action).options'). + +```csharp +public OracleDistributedSynchronizationProvider(string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[OracleConnectionOptionsBuilder](OracleConnectionOptionsBuilder.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md new file mode 100644 index 00000000..3874d916 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') + +## OracleDistributedSynchronizationProvider(IDbConnection) Constructor + +Constructs a provider that connects with [connection](OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). + +```csharp +public OracleDistributedSynchronizationProvider(System.Data.IDbConnection connection); +``` +#### Parameters + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md new file mode 100644 index 00000000..89c2430d --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') + +## OracleDistributedSynchronizationProvider.CreateLock(string, bool) Method + +Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +is specified, invalid names will be escaped/hashed. + +```csharp +public Medallion.Threading.Oracle.OracleDistributedLock CreateLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md new file mode 100644 index 00000000..127ff692 --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle').[OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') + +## OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool) Method + +Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') +is specified, invalid names will be escaped/hashed. + +```csharp +public Medallion.Threading.Oracle.OracleDistributedReaderWriterLock CreateReaderWriterLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md new file mode 100644 index 00000000..03d6297f --- /dev/null +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md @@ -0,0 +1,28 @@ +#### [DistributedLock.Oracle](README.md 'README') +### [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') + +## OracleDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') +and [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') + +```csharp +public sealed class OracleDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, +Medallion.Threading.IDistributedReaderWriterLockProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 OracleDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + +| Constructors | | +| :--- | :--- | +| [OracleDistributedSynchronizationProvider(string, Action<OracleConnectionOptionsBuilder>)](OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider that connects with [connectionString](OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](OracleDistributedSynchronizationProvider..ctor.Vs3QzXeKG/WYsARra1TfMA.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_).options 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(string, System.Action).options'). | +| [OracleDistributedSynchronizationProvider(IDbConnection)](OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(System.Data.IDbConnection)') | Constructs a provider that connects with [connection](OracleDistributedSynchronizationProvider..ctor.piz12qaqFtocRjH6VWNIGQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.OracleDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string, bool)](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | +| [CreateReaderWriterLock(string, bool)](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.Oracle/README.md b/docs/api/DistributedLock.Oracle/README.md new file mode 100644 index 00000000..7b3a511e --- /dev/null +++ b/docs/api/DistributedLock.Oracle/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.Oracle](README.md 'README') + +## DistributedLock.Oracle Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.Oracle](Medallion.Threading.Oracle.md 'Medallion.Threading.Oracle') | | diff --git a/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md b/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md new file mode 100644 index 00000000..ee5b3cdc --- /dev/null +++ b/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md @@ -0,0 +1,16 @@ +#### [DistributedLock.Postgres](README.md 'README') + +## Medallion.Threading.Postgres Namespace + +| Classes | | +| :--- | :--- | +| [PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') | Specifies options for connecting to and locking against a Postgres database | +| [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') | Implements a distributed lock using Postgres advisory locks
(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | +| [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') | Implements a distributed lock using Postgres advisory locks
(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | +| [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock'). | + +| Structs | | +| :--- | :--- | +| [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') | Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap).
See https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS | diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md new file mode 100644 index 00000000..a09b622b --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md @@ -0,0 +1,20 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey(int, int) Constructor + +Constructs a key from a pair of 32-bit values. This is a separate key space +than [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)'). + +```csharp +public PostgresAdvisoryLockKey(int key1, int key2); +``` +#### Parameters + + + +`key1` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`key2` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md new file mode 100644 index 00000000..3933aec2 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md @@ -0,0 +1,27 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey(string, bool) Constructor + +Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name'). + +If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys. + +If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with +any other key based on such a string or based on a 32-bit value. + +Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to +a 64-bit key value. + +```csharp +public PostgresAdvisoryLockKey(string name, bool allowHashing=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`allowHashing` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md new file mode 100644 index 00000000..2d6d9a32 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md @@ -0,0 +1,16 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey(long) Constructor + +Constructs a key from a single 64-bit value. This is a separate key space +than [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)'). + +```csharp +public PostgresAdvisoryLockKey(long key); +``` +#### Parameters + + + +`key` [System.Int64](https://docs.microsoft.com/en-us/dotnet/api/System.Int64 'System.Int64') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md new file mode 100644 index 00000000..e8cc570c --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.Equals(PostgresAdvisoryLockKey) Method + +Implements [System.IEquatable<>.Equals(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1.Equals#System_IEquatable_1_Equals__0_ 'System.IEquatable`1.Equals(`0)') + +```csharp +public bool Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey that); +``` +#### Parameters + + + +`that` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md new file mode 100644 index 00000000..0fead8d4 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.Equals(object) Method + +Implements [System.Object.Equals(System.Object)](https://docs.microsoft.com/en-us/dotnet/api/System.Object.Equals#System_Object_Equals_System_Object_ 'System.Object.Equals(System.Object)') + +```csharp +public override bool Equals(object obj); +``` +#### Parameters + + + +`obj` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.GetHashCode().md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.GetHashCode().md new file mode 100644 index 00000000..0b62ccdc --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.GetHashCode().md @@ -0,0 +1,13 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.GetHashCode() Method + +Implements [System.Object.GetHashCode](https://docs.microsoft.com/en-us/dotnet/api/System.Object.GetHashCode 'System.Object.GetHashCode') + +```csharp +public override int GetHashCode(); +``` + +#### Returns +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md new file mode 100644 index 00000000..b62300aa --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md @@ -0,0 +1,14 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.ToString() Method + +Returns a string representation of the key that can be round-tripped through +[PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') + +```csharp +public override string ToString(); +``` + +#### Returns +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md new file mode 100644 index 00000000..553528fd --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md @@ -0,0 +1,32 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresAdvisoryLockKey Struct + +Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap). +See https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS + +```csharp +public readonly struct PostgresAdvisoryLockKey : +System.IEquatable +``` + +Implements [System.IEquatable<](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System.IEquatable`1')[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey')[>](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System.IEquatable`1') + +| Constructors | | +| :--- | :--- | +| [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)') | Constructs a key from a pair of 32-bit values. This is a separate key space
than [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)'). | +| [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)') | Constructs a key from a single 64-bit value. This is a separate key space
than [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)'). | +| [PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name').

If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys.

If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with
any other key based on such a string or based on a 32-bit value.

Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to
a 64-bit key value. | + +| Methods | | +| :--- | :--- | +| [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Implements [System.IEquatable<>.Equals(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1.Equals#System_IEquatable_1_Equals__0_ 'System.IEquatable`1.Equals(`0)') | +| [Equals(object)](PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(object)') | Implements [System.Object.Equals(System.Object)](https://docs.microsoft.com/en-us/dotnet/api/System.Object.Equals#System_Object_Equals_System_Object_ 'System.Object.Equals(System.Object)') | +| [GetHashCode()](PostgresAdvisoryLockKey.GetHashCode().md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.GetHashCode()') | Implements [System.Object.GetHashCode](https://docs.microsoft.com/en-us/dotnet/api/System.Object.GetHashCode 'System.Object.GetHashCode') | +| [ToString()](PostgresAdvisoryLockKey.ToString().md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.ToString()') | Returns a string representation of the key that can be round-tripped through
[PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | + +| Operators | | +| :--- | :--- | +| [operator ==(PostgresAdvisoryLockKey, PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.op_Equality(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Provides equality based on [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | +| [operator !=(PostgresAdvisoryLockKey, PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.op_Inequality(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Provides inequality based on [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md new file mode 100644 index 00000000..5ce42caf --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Equality.WzLfN5crVgBoMiN0RMIAhA.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.operator ==(PostgresAdvisoryLockKey, PostgresAdvisoryLockKey) Operator + +Provides equality based on [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') + +```csharp +public static bool operator ==(Medallion.Threading.Postgres.PostgresAdvisoryLockKey a, Medallion.Threading.Postgres.PostgresAdvisoryLockKey b); +``` +#### Parameters + + + +`a` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`b` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md new file mode 100644 index 00000000..7328789d --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.op_Inequality.QLx2INIQzAIzn1yA2+FG0Q.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +## PostgresAdvisoryLockKey.operator !=(PostgresAdvisoryLockKey, PostgresAdvisoryLockKey) Operator + +Provides inequality based on [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') + +```csharp +public static bool operator !=(Medallion.Threading.Postgres.PostgresAdvisoryLockKey a, Medallion.Threading.Postgres.PostgresAdvisoryLockKey b); +``` +#### Parameters + + + +`a` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`b` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md new file mode 100644 index 00000000..f53f2d27 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') + +## PostgresConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method + +Some Postgres setups have automation in place which aggressively kills idle connections. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. +Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. + +Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'), which disables keepalive. + +```csharp +public Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder KeepaliveCadence(System.TimeSpan keepaliveCadence); +``` +#### Parameters + + + +`keepaliveCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md new file mode 100644 index 00000000..0ebac02a --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') + +## PostgresConnectionOptionsBuilder.UseMultiplexing(bool) Method + +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +semantics are used with a zero-length timeout. + +```csharp +public Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder UseMultiplexing(bool useMultiplexing=true); +``` +#### Parameters + + + +`useMultiplexing` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md new file mode 100644 index 00000000..6d7743eb --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md @@ -0,0 +1,17 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresConnectionOptionsBuilder Class + +Specifies options for connecting to and locking against a Postgres database + +```csharp +public sealed class PostgresConnectionOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresConnectionOptionsBuilder + +| Methods | | +| :--- | :--- | +| [KeepaliveCadence(TimeSpan)](PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Some Postgres setups have automation in place which aggressively kills idle connections.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.
Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it.

Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'), which disables keepalive. | +| [UseMultiplexing(bool)](PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md new file mode 100644 index 00000000..23b4973b --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock(PostgresAdvisoryLockKey, IDbConnection) Constructor + +Constructs a lock with the given [key](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). + +```csharp +public PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key, System.Data.IDbConnection connection); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md new file mode 100644 index 00000000..cb4a4e40 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock(PostgresAdvisoryLockKey, string, Action) Constructor + +Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), +and [options](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') + +```csharp +public PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md new file mode 100644 index 00000000..c3b0f3cd --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') +A [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md new file mode 100644 index 00000000..4b7a6d2a --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Key.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Key.md new file mode 100644 index 00000000..7f80fda6 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Key.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock.Key Property + +The [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') that uniquely identifies the lock on the database + +```csharp +public Medallion.Threading.Postgres.PostgresAdvisoryLockKey Key { get; } +``` + +#### Property Value +[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md new file mode 100644 index 00000000..8d476086 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') +A [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md new file mode 100644 index 00000000..8592d9f1 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') + +## PostgresDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md new file mode 100644 index 00000000..b5562609 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md @@ -0,0 +1,32 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresDistributedLock Class + +Implements a distributed lock using Postgres advisory locks +(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) + +```csharp +public sealed class PostgresDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [PostgresDistributedLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'),
and [options](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | +| [PostgresDistributedLock(PostgresAdvisoryLockKey, IDbConnection)](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection)') | Constructs a lock with the given [key](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). | + +| Properties | | +| :--- | :--- | +| [Key](PostgresDistributedLock.Key.md 'Medallion.Threading.Postgres.PostgresDistributedLock.Key') | The [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') that uniquely identifies the lock on the database | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md 'Medallion.Threading.Postgres.PostgresDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md 'Medallion.Threading.Postgres.PostgresDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md 'Medallion.Threading.Postgres.PostgresDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md 'Medallion.Threading.Postgres.PostgresDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..6aed5361 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') + +## PostgresDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..a2ef5f65 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') + +## PostgresDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..50c67bfe --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') + +## PostgresDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.md new file mode 100644 index 00000000..1ae6b2df --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class PostgresDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](PostgresDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](PostgresDistributedLockHandle.Dispose().md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](PostgresDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md new file mode 100644 index 00000000..b1a962da --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, string, Action) Constructor + +Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), +and [options](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') + +```csharp +public PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md new file mode 100644 index 00000000..8972a1dd --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, IDbConnection) Constructor + +Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). + +```csharp +public PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key, System.Data.IDbConnection connection); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md new file mode 100644 index 00000000..de299a67 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method + +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle AcquireReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md new file mode 100644 index 00000000..643fd278 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md new file mode 100644 index 00000000..9c25d5c2 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method + +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle AcquireWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md new file mode 100644 index 00000000..befd6749 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.Key.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.Key.md new file mode 100644 index 00000000..2b3c111d --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.Key.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.Key Property + +The [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') that uniquely identifies the lock on the database + +```csharp +public Medallion.Threading.Postgres.PostgresAdvisoryLockKey Key { get; } +``` + +#### Property Value +[PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md new file mode 100644 index 00000000..5e67e7b0 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle? TryAcquireReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md new file mode 100644 index 00000000..c3440dcd --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md new file mode 100644 index 00000000..20369a53 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle? TryAcquireWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md new file mode 100644 index 00000000..4bbd9bbc --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') + +## PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md new file mode 100644 index 00000000..d93d2294 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md @@ -0,0 +1,36 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresDistributedReaderWriterLock Class + +Implements a distributed lock using Postgres advisory locks +(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) + +```csharp +public sealed class PostgresDistributedReaderWriterLock : +Medallion.Threading.IDistributedReaderWriterLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresDistributedReaderWriterLock + +Implements [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Constructors | | +| :--- | :--- | +| [PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'),
and [options](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | +| [PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, IDbConnection)](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection)') | Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). | + +| Properties | | +| :--- | :--- | +| [Key](PostgresDistributedReaderWriterLock.Key.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.Key') | The [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') that uniquely identifies the lock on the database | + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLock(TimeSpan, CancellationToken)](PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireWriteLock(TimeSpan, CancellationToken)](PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.Dispose().md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.Dispose().md new file mode 100644 index 00000000..b593fb89 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') + +## PostgresDistributedReaderWriterLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.DisposeAsync().md new file mode 100644 index 00000000..ba2d91d3 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') + +## PostgresDistributedReaderWriterLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.HandleLostToken.md new file mode 100644 index 00000000..74a3051e --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') + +## PostgresDistributedReaderWriterLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.md new file mode 100644 index 00000000..463b0cb7 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresDistributedReaderWriterLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class PostgresDistributedReaderWriterLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresDistributedReaderWriterLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](PostgresDistributedReaderWriterLockHandle.HandleLostToken.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](PostgresDistributedReaderWriterLockHandle.Dispose().md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](PostgresDistributedReaderWriterLockHandle.DisposeAsync().md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md new file mode 100644 index 00000000..285644ba --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') + +## PostgresDistributedSynchronizationProvider(IDbConnection) Constructor + +Constructs a provider which connects to Postgres using the provided [connection](PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). + +```csharp +public PostgresDistributedSynchronizationProvider(System.Data.IDbConnection connection); +``` +#### Parameters + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md new file mode 100644 index 00000000..7feea992 --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') + +## PostgresDistributedSynchronizationProvider(string, Action) Constructor + +Constructs a provider which connects to Postgres using the provided [connectionString](PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string, System.Action).options'). + +```csharp +public PostgresDistributedSynchronizationProvider(string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md new file mode 100644 index 00000000..3a11caff --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') + +## PostgresDistributedSynchronizationProvider.CreateLock(PostgresAdvisoryLockKey) Method + +Creates a [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') with the provided [key](PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key'). + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedLock CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +#### Returns +[PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md new file mode 100644 index 00000000..af72380e --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres').[PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') + +## PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(PostgresAdvisoryLockKey) Method + +Creates a [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') with the provided [key](PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key'). + +```csharp +public Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey key); +``` +#### Parameters + + + +`key` [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') + +#### Returns +[PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md new file mode 100644 index 00000000..3143549f --- /dev/null +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md @@ -0,0 +1,27 @@ +#### [DistributedLock.Postgres](README.md 'README') +### [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') + +## PostgresDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and +[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock'). + +```csharp +public sealed class PostgresDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedReaderWriterLockProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 PostgresDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') + +| Constructors | | +| :--- | :--- | +| [PostgresDistributedSynchronizationProvider(string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider which connects to Postgres using the provided [connectionString](PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](PostgresDistributedSynchronizationProvider..ctor.eWR3ijjn8fn/O9iDMaj84A.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(string, System.Action).options'). | +| [PostgresDistributedSynchronizationProvider(IDbConnection)](PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(System.Data.IDbConnection)') | Constructs a provider which connects to Postgres using the provided [connection](PostgresDistributedSynchronizationProvider..ctor.ckDCmo/6Rn0lmgbFNQtUvw.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.PostgresDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(PostgresAdvisoryLockKey)](PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Creates a [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') with the provided [key](PostgresDistributedSynchronizationProvider.CreateLock.GJPVJ6V91GLdKcIfqFwqeA.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key'). | +| [CreateReaderWriterLock(PostgresAdvisoryLockKey)](PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Creates a [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') with the provided [key](PostgresDistributedSynchronizationProvider.CreateReaderWriterLock.N41hd49fnwW4xwtKSKqA9Q.md#Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider.CreateReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey).key'). | diff --git a/docs/api/DistributedLock.Postgres/README.md b/docs/api/DistributedLock.Postgres/README.md new file mode 100644 index 00000000..a0a5d62d --- /dev/null +++ b/docs/api/DistributedLock.Postgres/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.Postgres](README.md 'README') + +## DistributedLock.Postgres Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.Postgres](Medallion.Threading.Postgres.md 'Medallion.Threading.Postgres') | | diff --git a/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md b/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md new file mode 100644 index 00000000..a9966b0f --- /dev/null +++ b/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md @@ -0,0 +1,14 @@ +#### [DistributedLock.Redis](README.md 'README') + +## Medallion.Threading.Redis Namespace + +| Classes | | +| :--- | :--- | +| [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') | Implements a [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') using Redis. Can leverage multiple servers via the RedLock algorithm. | +| [RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') | +| [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') | Implements a [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') using Redis. Can leverage multiple servers via the RedLock algorithm. | +| [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') | +| [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') | Implements a [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') using Redis. | +| [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for a [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') | +| [RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') | Options for configuring a redis-based distributed synchronization algorithm | +| [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'),
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.Redis/README.md b/docs/api/DistributedLock.Redis/README.md new file mode 100644 index 00000000..e73ccd08 --- /dev/null +++ b/docs/api/DistributedLock.Redis/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.Redis](README.md 'README') + +## DistributedLock.Redis Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') | | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md b/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md new file mode 100644 index 00000000..d9777a60 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock(RedisKey, IEnumerable, Action) Constructor + +Constructs a lock named [key](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).key') using the provided [databases](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).databases') and [options](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).options'). + +```csharp +public RedisDistributedLock(RedisKey key, System.Collections.Generic.IEnumerable databases, System.Action? options=null); +``` +#### Parameters + + + +`key` [StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') + + + +`databases` [System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md b/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md new file mode 100644 index 00000000..45fca665 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock(RedisKey, IDatabase, Action) Constructor + +Constructs a lock named [key](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).key') using the provided [database](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).database') and [options](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).options'). + +```csharp +public RedisDistributedLock(RedisKey key, IDatabase database, System.Action? options=null); +``` +#### Parameters + + + +`key` [StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') + + + +`database` [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md new file mode 100644 index 00000000..c6c5e8c6 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') +A [RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md new file mode 100644 index 00000000..7d69b6a1 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.Key.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.Key.md new file mode 100644 index 00000000..9a0c606f --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.Key.md @@ -0,0 +1,13 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.Key Property + +The Redis key used to implement the lock + +```csharp +public RedisKey Key { get; } +``` + +#### Property Value +[StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.Name.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.Name.md new file mode 100644 index 00000000..f3fa4b5e --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md new file mode 100644 index 00000000..8b642fa9 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') +A [RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md new file mode 100644 index 00000000..5dde8e48 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +## RedisDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.md new file mode 100644 index 00000000..974cc323 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.md @@ -0,0 +1,32 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedLock Class + +Implements a [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') using Redis. Can leverage multiple servers via the RedLock algorithm. + +```csharp +public sealed class RedisDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [RedisDistributedLock(RedisKey, IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action)') | Constructs a lock named [key](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).key') using the provided [database](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).database') and [options](RedisDistributedLock..ctor.umu5PN9uhldmmDNU7XvM2g.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, IDatabase, System.Action).options'). | +| [RedisDistributedLock(RedisKey, IEnumerable<IDatabase>, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action)') | Constructs a lock named [key](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).key') using the provided [databases](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).databases') and [options](RedisDistributedLock..ctor.CAJif2Aj+id/ZDgt9bfHHg.md#Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedLock.RedisDistributedLock(RedisKey, System.Collections.Generic.IEnumerable, System.Action).options'). | + +| Properties | | +| :--- | :--- | +| [Key](RedisDistributedLock.Key.md 'Medallion.Threading.Redis.RedisDistributedLock.Key') | The Redis key used to implement the lock | +| [Name](RedisDistributedLock.Name.md 'Medallion.Threading.Redis.RedisDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md 'Medallion.Threading.Redis.RedisDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](RedisDistributedLock.AcquireAsync./QjYv9rC4HwcQmk9yh4x5g.md 'Medallion.Threading.Redis.RedisDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md 'Medallion.Threading.Redis.RedisDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md 'Medallion.Threading.Redis.RedisDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..58bc40e5 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') + +## RedisDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..16ee25a9 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') + +## RedisDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..460c1e68 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedLockHandle](RedisDistributedLockHandle.md 'Medallion.Threading.Redis.RedisDistributedLockHandle') + +## RedisDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.md b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.md new file mode 100644 index 00000000..08bdbe2f --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') + +```csharp +public sealed class RedisDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](RedisDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.Redis.RedisDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](RedisDistributedLockHandle.Dispose().md 'Medallion.Threading.Redis.RedisDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](RedisDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.Redis.RedisDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md new file mode 100644 index 00000000..1cf1957c --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock(string, IDatabase, Action) Constructor + +Constructs a lock named [name](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).name') using the provided [database](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).database') and [options](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).options'). + +```csharp +public RedisDistributedReaderWriterLock(string name, IDatabase database, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`database` [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md new file mode 100644 index 00000000..591b5745 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock(string, IEnumerable, Action) Constructor + +Constructs a lock named [name](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).name') using the provided [databases](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).databases') and [options](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).options'). + +```csharp +public RedisDistributedReaderWriterLock(string name, System.Collections.Generic.IEnumerable databases, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`databases` [System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md new file mode 100644 index 00000000..c51a6cc0 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method + +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle AcquireReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md new file mode 100644 index 00000000..7308a0cf --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md new file mode 100644 index 00000000..0c3adfcd --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method + +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle AcquireWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md new file mode 100644 index 00000000..9d5d108e --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.Name.md new file mode 100644 index 00000000..6b4502c4 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md new file mode 100644 index 00000000..c1523728 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle? TryAcquireReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md new file mode 100644 index 00000000..8a1995dc --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md new file mode 100644 index 00000000..3a9ee172 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle? TryAcquireWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md new file mode 100644 index 00000000..a77bc288 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +## RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.md new file mode 100644 index 00000000..e4be264c --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.md @@ -0,0 +1,35 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedReaderWriterLock Class + +Implements a [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') using Redis. Can leverage multiple servers via the RedLock algorithm. + +```csharp +public sealed class RedisDistributedReaderWriterLock : +Medallion.Threading.IDistributedReaderWriterLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedReaderWriterLock + +Implements [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Constructors | | +| :--- | :--- | +| [RedisDistributedReaderWriterLock(string, IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action)') | Constructs a lock named [name](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).name') using the provided [database](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).database') and [options](RedisDistributedReaderWriterLock..ctor.UjOB67V/r8BOTbBDgotYOw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, IDatabase, System.Action).options'). | +| [RedisDistributedReaderWriterLock(string, IEnumerable<IDatabase>, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action)') | Constructs a lock named [name](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).name') using the provided [databases](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).databases') and [options](RedisDistributedReaderWriterLock..ctor.qFVv5NEfnVwOxiU3/Na6Nw.md#Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string,System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.RedisDistributedReaderWriterLock(string, System.Collections.Generic.IEnumerable, System.Action).options'). | + +| Properties | | +| :--- | :--- | +| [Name](RedisDistributedReaderWriterLock.Name.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') | + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLock(TimeSpan, CancellationToken)](RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireWriteLock(TimeSpan, CancellationToken)](RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.Dispose().md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.Dispose().md new file mode 100644 index 00000000..3af99941 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') + +## RedisDistributedReaderWriterLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.DisposeAsync().md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.DisposeAsync().md new file mode 100644 index 00000000..eebdcc36 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') + +## RedisDistributedReaderWriterLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.HandleLostToken.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.HandleLostToken.md new file mode 100644 index 00000000..5a082e81 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedReaderWriterLockHandle](RedisDistributedReaderWriterLockHandle.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle') + +## RedisDistributedReaderWriterLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.md new file mode 100644 index 00000000..c01bd04d --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedReaderWriterLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') + +```csharp +public sealed class RedisDistributedReaderWriterLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedReaderWriterLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](RedisDistributedReaderWriterLockHandle.HandleLostToken.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](RedisDistributedReaderWriterLockHandle.Dispose().md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](RedisDistributedReaderWriterLockHandle.DisposeAsync().md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md new file mode 100644 index 00000000..7fe407a3 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md @@ -0,0 +1,27 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore(RedisKey, int, IDatabase, Action) Constructor + +Constructs a semaphore named [key](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).key') using the provided [maxCount](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).maxCount 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).maxCount'), [database](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).database'), and [options](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).options'). + +```csharp +public RedisDistributedSemaphore(RedisKey key, int maxCount, IDatabase database, System.Action? options=null); +``` +#### Parameters + + + +`key` [StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`database` [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md new file mode 100644 index 00000000..46545889 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.Acquire(Nullable, CancellationToken) Method + +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedSemaphoreHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') +A [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md new file mode 100644 index 00000000..5f262db9 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method + +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.MaxCount.md new file mode 100644 index 00000000..ef4d80c7 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.MaxCount.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.MaxCount Property + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +```csharp +public int MaxCount { get; } +``` + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Name.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Name.md new file mode 100644 index 00000000..ebe6f176 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md new file mode 100644 index 00000000..a39d7c0d --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public Medallion.Threading.Redis.RedisDistributedSemaphoreHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') +A [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md new file mode 100644 index 00000000..69be8c34 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +## RedisDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.md new file mode 100644 index 00000000..81a0dda7 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedSemaphore Class + +Implements a [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') using Redis. + +```csharp +public sealed class RedisDistributedSemaphore : +Medallion.Threading.IDistributedSemaphore +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedSemaphore + +Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +| Constructors | | +| :--- | :--- | +| [RedisDistributedSemaphore(RedisKey, int, IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action)') | Constructs a semaphore named [key](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).key 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).key') using the provided [maxCount](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).maxCount 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).maxCount'), [database](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).database'), and [options](RedisDistributedSemaphore..ctor.uV7HEVNcvSXDYGL/CEuDZg.md#Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey,int,IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSemaphore.RedisDistributedSemaphore(RedisKey, int, IDatabase, System.Action).options'). | + +| Properties | | +| :--- | :--- | +| [MaxCount](RedisDistributedSemaphore.MaxCount.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.MaxCount') | Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | +| [Name](RedisDistributedSemaphore.Name.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md 'Medallion.Threading.Redis.RedisDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.Dispose().md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.Dispose().md new file mode 100644 index 00000000..b0e1f453 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') + +## RedisDistributedSemaphoreHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.DisposeAsync().md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.DisposeAsync().md new file mode 100644 index 00000000..01218352 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') + +## RedisDistributedSemaphoreHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.HandleLostToken.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.HandleLostToken.md new file mode 100644 index 00000000..4539531c --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') + +## RedisDistributedSemaphoreHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.md new file mode 100644 index 00000000..d97f5ae8 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphoreHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedSemaphoreHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for a [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') + +```csharp +public sealed class RedisDistributedSemaphoreHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedSemaphoreHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](RedisDistributedSemaphoreHandle.HandleLostToken.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](RedisDistributedSemaphoreHandle.Dispose().md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](RedisDistributedSemaphoreHandle.DisposeAsync().md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md new file mode 100644 index 00000000..c74c66a2 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md @@ -0,0 +1,31 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') + +## RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime(TimeSpan, TimeSpan) Method + +Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps. +This determines how much time is spent sleeping between attempts. Lower values will raise the +volume of acquire requests under contention but will also raise the responsiveness (how long +it takes a waiter to notice that a contended the lock has become available). + +Specifying a range of values allows the implementation to select an actual value in the range +at random for each sleep. This helps avoid the case where two clients become "synchronized" +in such a way that results in one client monopolizing the lock. + +The default is [10ms, 800ms] + +```csharp +public Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder BusyWaitSleepTime(System.TimeSpan min, System.TimeSpan max); +``` +#### Parameters + + + +`min` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`max` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md new file mode 100644 index 00000000..215251ff --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md @@ -0,0 +1,24 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') + +## RedisDistributedSynchronizationOptionsBuilder.Expiry(TimeSpan) Method + +Specifies how long the lock will last, absent auto-extension. Because auto-extension exists, +this value generally will have little effect on program behavior. However, making the expiry longer means that +auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned +without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes +would need to wait in order to acquire it. + +Defaults to 30s. + +```csharp +public Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder Expiry(System.TimeSpan expiry); +``` +#### Parameters + + + +`expiry` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md new file mode 100644 index 00000000..5d60a8a6 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') + +## RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence(TimeSpan) Method + +Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests +but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in +before the lock expiry elapses. + +Defaults to 1/3 of the specified [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)'). + +```csharp +public Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder ExtensionCadence(System.TimeSpan extensionCadence); +``` +#### Parameters + + + +`extensionCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md new file mode 100644 index 00000000..3041f214 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') + +## RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(TimeSpan) Method + +The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount +of time to acquire the lock, we will not have all of expiry available upon acquisition. + +This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes. + +Defaults to 90% of the specified lock expiry. + +```csharp +public Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder MinValidityTime(System.TimeSpan minValidityTime); +``` +#### Parameters + + + +`minValidityTime` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md new file mode 100644 index 00000000..5a7fd13a --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md @@ -0,0 +1,19 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedSynchronizationOptionsBuilder Class + +Options for configuring a redis-based distributed synchronization algorithm + +```csharp +public sealed class RedisDistributedSynchronizationOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedSynchronizationOptionsBuilder + +| Methods | | +| :--- | :--- | +| [BusyWaitSleepTime(TimeSpan, TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps.
This determines how much time is spent sleeping between attempts. Lower values will raise the
volume of acquire requests under contention but will also raise the responsiveness (how long
it takes a waiter to notice that a contended the lock has become available).

Specifying a range of values allows the implementation to select an actual value in the range
at random for each sleep. This helps avoid the case where two clients become "synchronized"
in such a way that results in one client monopolizing the lock.

The default is [10ms, 800ms] | +| [Expiry(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.Expiry(System.TimeSpan)') | Specifies how long the lock will last, absent auto-extension. Because auto-extension exists,
this value generally will have little effect on program behavior. However, making the expiry longer means that
auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned
without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes
would need to wait in order to acquire it.

Defaults to 30s. | +| [ExtensionCadence(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence(System.TimeSpan)') | Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests
but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in
before the lock expiry elapses.

Defaults to 1/3 of the specified [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)'). | +| [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)') | The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount
of time to acquire the lock, we will not have all of expiry available upon acquisition.

This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes.

Defaults to 90% of the specified lock expiry. | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md new file mode 100644 index 00000000..d9b532cf --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md @@ -0,0 +1,23 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') + +## RedisDistributedSynchronizationProvider(IEnumerable, Action) Constructor + +Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases') +and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options'). + +Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first +[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase'). + +```csharp +public RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable databases, System.Action? options=null); +``` +#### Parameters + + + +`databases` [System.Collections.Generic.IEnumerable<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1')[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEnumerable-1 'System.Collections.Generic.IEnumerable`1') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md new file mode 100644 index 00000000..f0402a74 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md @@ -0,0 +1,20 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') + +## RedisDistributedSynchronizationProvider(IDatabase, Action) Constructor + +Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database') +and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).options'). + +```csharp +public RedisDistributedSynchronizationProvider(IDatabase database, System.Action? options=null); +``` +#### Parameters + + + +`database` [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md new file mode 100644 index 00000000..67fccb77 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md @@ -0,0 +1,18 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') + +## RedisDistributedSynchronizationProvider.CreateLock(RedisKey) Method + +Creates a [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') using the given [key](RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateLock(RedisKey).key 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateLock(RedisKey).key'). + +```csharp +public Medallion.Threading.Redis.RedisDistributedLock CreateLock(RedisKey key); +``` +#### Parameters + + + +`key` [StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') + +#### Returns +[RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md new file mode 100644 index 00000000..d8ef992d --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md @@ -0,0 +1,20 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') + +## RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string) Method + +Creates a [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') using the given [name](RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string).name'). + +```csharp +public Medallion.Threading.Redis.RedisDistributedReaderWriterLock CreateReaderWriterLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +Implements [CreateReaderWriterLock(string)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(System.String)') + +#### Returns +[RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md new file mode 100644 index 00000000..27298f78 --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md @@ -0,0 +1,22 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis').[RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') + +## RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int) Method + +Creates a [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') using the provided [key](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey,int).key 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int).key') and [maxCount](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey,int).maxCount 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int).maxCount'). + +```csharp +public Medallion.Threading.Redis.RedisDistributedSemaphore CreateSemaphore(RedisKey key, int maxCount); +``` +#### Parameters + + + +`key` [StackExchange.Redis.RedisKey](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.RedisKey 'StackExchange.Redis.RedisKey') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + +#### Returns +[RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') \ No newline at end of file diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md new file mode 100644 index 00000000..343d81ca --- /dev/null +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md @@ -0,0 +1,30 @@ +#### [DistributedLock.Redis](README.md 'README') +### [Medallion.Threading.Redis](Medallion.Threading.Redis.md 'Medallion.Threading.Redis') + +## RedisDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'), +[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'), +and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore'). + +```csharp +public sealed class RedisDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedReaderWriterLockProvider, +Medallion.Threading.IDistributedSemaphoreProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 RedisDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider'), [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +| Constructors | | +| :--- | :--- | +| [RedisDistributedSynchronizationProvider(IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database')
and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).options'). | +| [RedisDistributedSynchronizationProvider(IEnumerable<IDatabase>, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases')
and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options').

Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first
[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(RedisKey)](RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateLock(RedisKey)') | Creates a [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock') using the given [key](RedisDistributedSynchronizationProvider.CreateLock.Po1Hx+wws4GErhhVofAcYw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateLock(RedisKey).key 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateLock(RedisKey).key'). | +| [CreateReaderWriterLock(string)](RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string)') | Creates a [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock') using the given [name](RedisDistributedSynchronizationProvider.CreateReaderWriterLock.PcVOlZP3alEScwR0NJiftQ.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateReaderWriterLock(string).name'). | +| [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') | Creates a [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') using the provided [key](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey,int).key 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int).key') and [maxCount](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey,int).maxCount 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int).maxCount'). | diff --git a/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md b/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md new file mode 100644 index 00000000..1e89bf13 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') + +## Medallion.Threading.SqlServer Namespace + +| Classes | | +| :--- | :--- | +| [SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') | Specifies options for connecting to and locking against a SQL database | +| [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') | Implements a distributed lock using a SQL server application lock
(see https://msdn.microsoft.com/en-us/library/ms189823.aspx) | +| [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') | Implements reader-writer lock semantics using a SQL server application lock
(see https://msdn.microsoft.com/en-us/library/ms189823.aspx).

This class supports the following patterns:
* Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'))
* Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'))
* Upgradeable read locks similar to [System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock 'System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock') (using [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') and [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)')) | +| [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') | Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | +| [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') | Implements a distributed semaphore using SQL Server constructs. | +| [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'),
[IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.SqlServer/README.md b/docs/api/DistributedLock.SqlServer/README.md new file mode 100644 index 00000000..f309ed5b --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.SqlServer](README.md 'README') + +## DistributedLock.SqlServer Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') | | diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md new file mode 100644 index 00000000..56db7d32 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') + +## SqlConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method + +Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor +which proactively kills idle connections. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. +Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. + +To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'). + +Defaults to 10 minutes based on Azure's 30 minute default behavior. + +For more information, see the dicussion on https://github.com/madelson/DistributedLock/issues/5 + +```csharp +public Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder KeepaliveCadence(System.TimeSpan keepaliveCadence); +``` +#### Parameters + + + +`keepaliveCadence` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md new file mode 100644 index 00000000..83624a76 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md @@ -0,0 +1,31 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') + +## SqlConnectionOptionsBuilder.UseMultiplexing(bool) Method + +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +semantics are used with a zero-length timeout. + +```csharp +public Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder UseMultiplexing(bool useMultiplexing=true); +``` +#### Parameters + + + +`useMultiplexing` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md new file mode 100644 index 00000000..47654b32 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md @@ -0,0 +1,23 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') + +## SqlConnectionOptionsBuilder.UseTransaction(bool) Method + +Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false. + +Synchronizing based on a transaction is marginally less expensive than using a connection +because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction'). +The disadvantage is that using this strategy may lead to long-running transactions, which can be +problematic for databases using the full recovery model. + +```csharp +public Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder UseTransaction(bool useTransaction=true); +``` +#### Parameters + + + +`useTransaction` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md new file mode 100644 index 00000000..653ed035 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md @@ -0,0 +1,18 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlConnectionOptionsBuilder Class + +Specifies options for connecting to and locking against a SQL database + +```csharp +public sealed class SqlConnectionOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlConnectionOptionsBuilder + +| Methods | | +| :--- | :--- | +| [KeepaliveCadence(TimeSpan)](SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor
which proactively kills idle connections.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.
Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it.

To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan').

Defaults to 10 minutes based on Azure's 30 minute default behavior.

For more information, see the dicussion on https://github.com/madelson/DistributedLock/issues/5 | +| [UseMultiplexing(bool)](SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | +| [UseTransaction(bool)](SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseTransaction(bool)') | Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false.

Synchronizing based on a transaction is marginally less expensive than using a connection
because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction').
The disadvantage is that using this strategy may lead to long-running transactions, which can be
problematic for databases using the full recovery model. | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md new file mode 100644 index 00000000..09b18bec --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md @@ -0,0 +1,31 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock(string, string, Action, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name'). + +The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + +Unless [exactName](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedLock(string name, string connectionString, System.Action? options=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md new file mode 100644 index 00000000..d9aa1a1d --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock(string, IDbConnection, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + +Unless [exactName](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedLock(string name, System.Data.IDbConnection connection, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md new file mode 100644 index 00000000..ca6e5040 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock(string, IDbTransaction, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name'). + +The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be committed or rolled back. + +Unless [exactName](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedLock(string name, System.Data.IDbTransaction transaction, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md new file mode 100644 index 00000000..53fa953f --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock.Acquire(Nullable, CancellationToken) Method + +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedLockHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') +A [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md new file mode 100644 index 00000000..9b9df07a --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Name.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Name.md new file mode 100644 index 00000000..9943f3e9 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md new file mode 100644 index 00000000..b45da7b4 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedLockHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') +A [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md new file mode 100644 index 00000000..e6e3a189 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') + +## SqlDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md new file mode 100644 index 00000000..35df135f --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md @@ -0,0 +1,33 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedLock Class + +Implements a distributed lock using a SQL server application lock +(see https://msdn.microsoft.com/en-us/library/ms189823.aspx) + +```csharp +public sealed class SqlDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [SqlDistributedLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name').

The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedLock(string, IDbConnection, bool)](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedLock(string, IDbTransaction, bool)](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name').

The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be committed or rolled back.

Unless [exactName](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](SqlDistributedLock.Name.md 'Medallion.Threading.SqlServer.SqlDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md 'Medallion.Threading.SqlServer.SqlDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md 'Medallion.Threading.SqlServer.SqlDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md 'Medallion.Threading.SqlServer.SqlDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md 'Medallion.Threading.SqlServer.SqlDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..5dc15f62 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') + +## SqlDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..47e7943a --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') + +## SqlDistributedLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..fd8f1775 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') + +## SqlDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.md new file mode 100644 index 00000000..13fa0be0 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLockHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class SqlDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](SqlDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](SqlDistributedLockHandle.Dispose().md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](SqlDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md new file mode 100644 index 00000000..fa3ab475 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock(string, IDbTransaction, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name'). + +The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be committed or rolled back. + +Unless [exactName](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedReaderWriterLock(string name, System.Data.IDbTransaction transaction, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md new file mode 100644 index 00000000..722d9099 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock(string, IDbConnection, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + +Unless [exactName](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedReaderWriterLock(string name, System.Data.IDbConnection connection, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md new file mode 100644 index 00000000..3bf05eea --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md @@ -0,0 +1,31 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock(string, string, Action, bool) Constructor + +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name'). + +The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + +Unless [exactName](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public SqlDistributedReaderWriterLock(string name, string connectionString, System.Action? options=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md new file mode 100644 index 00000000..58d8c2af --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method + +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle AcquireReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md new file mode 100644 index 00000000..0c3f670e --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md new file mode 100644 index 00000000..51849f22 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle AcquireUpgradeableReadLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') +A [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md new file mode 100644 index 00000000..846e71dc --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method + +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireUpgradeableReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md new file mode 100644 index 00000000..32208f77 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method + +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle AcquireWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md new file mode 100644 index 00000000..dea74559 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.Name.md new file mode 100644 index 00000000..6345e705 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md new file mode 100644 index 00000000..db90a0d4 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle? TryAcquireReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md new file mode 100644 index 00000000..74bca304 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md new file mode 100644 index 00000000..f2451a03 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle? TryAcquireUpgradeableReadLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') +A [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md new file mode 100644 index 00000000..62c3f4db --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireUpgradeableReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md new file mode 100644 index 00000000..6f175b19 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle? TryAcquireWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md new file mode 100644 index 00000000..52a6e46d --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') + +## SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md new file mode 100644 index 00000000..6590baee --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md @@ -0,0 +1,47 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedReaderWriterLock Class + +Implements reader-writer lock semantics using a SQL server application lock +(see https://msdn.microsoft.com/en-us/library/ms189823.aspx). + +This class supports the following patterns: +* Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)')) +* Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)')) +* Upgradeable read locks similar to [System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock 'System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock') (using [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') and [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)')) + +```csharp +public sealed class SqlDistributedReaderWriterLock : +Medallion.Threading.IDistributedUpgradeableReaderWriterLock, +Medallion.Threading.IDistributedReaderWriterLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedReaderWriterLock + +Implements [IDistributedUpgradeableReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock'), [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Constructors | | +| :--- | :--- | +| [SqlDistributedReaderWriterLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name').

The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedReaderWriterLock(string, IDbConnection, bool)](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedReaderWriterLock(string, IDbTransaction, bool)](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name').

The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be committed or rolled back.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](SqlDistributedReaderWriterLock.Name.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLock(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: | +| [TryAcquireWriteLock(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.Dispose().md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.Dispose().md new file mode 100644 index 00000000..dd30347e --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') + +## SqlDistributedReaderWriterLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.DisposeAsync().md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.DisposeAsync().md new file mode 100644 index 00000000..86773d00 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') + +## SqlDistributedReaderWriterLockHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public abstract System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.HandleLostToken.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.HandleLostToken.md new file mode 100644 index 00000000..78d21b2c --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') + +## SqlDistributedReaderWriterLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public abstract System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.md new file mode 100644 index 00000000..b17827f8 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockHandle.md @@ -0,0 +1,29 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedReaderWriterLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public abstract class SqlDistributedReaderWriterLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedReaderWriterLockHandle + +Derived +↳ [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](SqlDistributedReaderWriterLockHandle.HandleLostToken.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](SqlDistributedReaderWriterLockHandle.Dispose().md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](SqlDistributedReaderWriterLockHandle.DisposeAsync().md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md new file mode 100644 index 00000000..bfd76279 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync() Method + +Releases the lock asynchronously + +```csharp +public override System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md new file mode 100644 index 00000000..0d1cc85c --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public override System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md new file mode 100644 index 00000000..c406b858 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md @@ -0,0 +1,24 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock(TimeSpan, CancellationToken) Method + +Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +```csharp +public bool TryUpgradeToWriteLock(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.8oq6BCJTyac4Rk/328XUBw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.8oq6BCJTyac4Rk/328XUBw.md new file mode 100644 index 00000000..9fa065dd --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.8oq6BCJTyac4Rk/328XUBw.md @@ -0,0 +1,24 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken) Method + +Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +```csharp +public System.Threading.Tasks.ValueTask TryUpgradeToWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.jbRB6OR/9hXGBo4CJ+m0bw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.jbRB6OR/9hXGBo4CJ+m0bw.md new file mode 100644 index 00000000..1dca2247 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.jbRB6OR/9hXGBo4CJ+m0bw.md @@ -0,0 +1,21 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock(Nullable, CancellationToken) Method + +Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +```csharp +public void UpgradeToWriteLock(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md new file mode 100644 index 00000000..be589658 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md @@ -0,0 +1,24 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') + +## SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync(Nullable, CancellationToken) Method + +Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +```csharp +public System.Threading.Tasks.ValueTask UpgradeToWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.md new file mode 100644 index 00000000..a2691bcf --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLockUpgradeableHandle.md @@ -0,0 +1,30 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedReaderWriterLockUpgradeableHandle Class + +Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') + +```csharp +public sealed class SqlDistributedReaderWriterLockUpgradeableHandle : Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle, +Medallion.Threading.IDistributedLockUpgradeableHandle, +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') 🡒 SqlDistributedReaderWriterLockUpgradeableHandle + +Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle'), [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [DisposeAsync()](SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync().md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.DisposeAsync()') | Releases the lock asynchronously | +| [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock.zMUOGQVaJkWs3VcJXp+UCw.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan, System.Threading.CancellationToken)') | Implements [TryUpgradeToWriteLock(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock.kj/tM1emIKPQTMhyxJaEVg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLock(System.TimeSpan,System.Threading.CancellationToken)') | +| [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync.8oq6BCJTyac4Rk/328XUBw.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Implements [TryUpgradeToWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync.wN/ZfUBdRwlMtX9ctB9dtg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.TryUpgradeToWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') | +| [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock.jbRB6OR/9hXGBo4CJ+m0bw.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable, System.Threading.CancellationToken)') | Implements [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') | +| [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync.Vi+8+okgqbatuvWRASkevg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Implements [UpgradeToWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync.5X2Faf/VtyA3b0uF1JN1kg.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md new file mode 100644 index 00000000..10bb1e90 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md @@ -0,0 +1,26 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore(string, int, IDbConnection) Constructor + +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount') +times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection'). +The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will +not attempt to open, close, or dispose it + +```csharp +public SqlDistributedSemaphore(string name, int maxCount, System.Data.IDbConnection connection); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md new file mode 100644 index 00000000..70f2a845 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md @@ -0,0 +1,26 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore(string, int, IDbTransaction) Constructor + +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount') +times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction'). +The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed: +the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, commit, roll back, or dispose them + +```csharp +public SqlDistributedSemaphore(string name, int maxCount, System.Data.IDbTransaction transaction); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md new file mode 100644 index 00000000..54ea9599 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md @@ -0,0 +1,28 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore(string, int, string, Action) Constructor + +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount') +times concurrently. The provided [connectionString](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).connectionString') will be used to connect to the database. + +```csharp +public SqlDistributedSemaphore(string name, int maxCount, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md new file mode 100644 index 00000000..45f88a0a --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.Acquire(Nullable, CancellationToken) Method + +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle Acquire(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') +A [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md new file mode 100644 index 00000000..6549f121 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method + +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.MaxCount.md new file mode 100644 index 00000000..a8be4457 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.MaxCount.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.MaxCount Property + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +```csharp +public int MaxCount { get; } +``` + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Name.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Name.md new file mode 100644 index 00000000..d5a1fca4 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md new file mode 100644 index 00000000..8b6caef7 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle? TryAcquire(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') +A [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md new file mode 100644 index 00000000..238f6060 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') + +## SqlDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md new file mode 100644 index 00000000..e4678045 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md @@ -0,0 +1,33 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedSemaphore Class + +Implements a distributed semaphore using SQL Server constructs. + +```csharp +public sealed class SqlDistributedSemaphore : +Medallion.Threading.IDistributedSemaphore +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedSemaphore + +Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +| Constructors | | +| :--- | :--- | +| [SqlDistributedSemaphore(string, int, string, Action<SqlConnectionOptionsBuilder>)](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount')
times concurrently. The provided [connectionString](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).connectionString') will be used to connect to the database. | +| [SqlDistributedSemaphore(string, int, IDbConnection)](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount')
times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection').
The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will
not attempt to open, close, or dispose it | +| [SqlDistributedSemaphore(string, int, IDbTransaction)](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount')
times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction').
The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed:
the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, commit, roll back, or dispose them | + +| Properties | | +| :--- | :--- | +| [MaxCount](SqlDistributedSemaphore.MaxCount.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.MaxCount') | Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | +| [Name](SqlDistributedSemaphore.Name.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.Dispose().md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.Dispose().md new file mode 100644 index 00000000..cd833a5a --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') + +## SqlDistributedSemaphoreHandle.Dispose() Method + +Releases the semaphore + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.DisposeAsync().md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.DisposeAsync().md new file mode 100644 index 00000000..48310c1a --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') + +## SqlDistributedSemaphoreHandle.DisposeAsync() Method + +Releases the semaphore asynchronously + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.HandleLostToken.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.HandleLostToken.md new file mode 100644 index 00000000..2edaca34 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') + +## SqlDistributedSemaphoreHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.md new file mode 100644 index 00000000..bdfe0067 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphoreHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedSemaphoreHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class SqlDistributedSemaphoreHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedSemaphoreHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](SqlDistributedSemaphoreHandle.HandleLostToken.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](SqlDistributedSemaphoreHandle.Dispose().md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle.Dispose()') | Releases the semaphore | +| [DisposeAsync()](SqlDistributedSemaphoreHandle.DisposeAsync().md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle.DisposeAsync()') | Releases the semaphore asynchronously | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md new file mode 100644 index 00000000..36b52829 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider(IDbTransaction) Constructor + +Constructs a provider that connects with [transaction](SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction'). + +```csharp +public SqlDistributedSynchronizationProvider(System.Data.IDbTransaction transaction); +``` +#### Parameters + + + +`transaction` [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md new file mode 100644 index 00000000..78a3e5c3 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md @@ -0,0 +1,19 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider(string, Action) Constructor + +Constructs a provider that connects with [connectionString](SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).options 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string, System.Action).options'). + +```csharp +public SqlDistributedSynchronizationProvider(string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md new file mode 100644 index 00000000..474f16ac --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md @@ -0,0 +1,15 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider(IDbConnection) Constructor + +Constructs a provider that connects with [connection](SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). + +```csharp +public SqlDistributedSynchronizationProvider(System.Data.IDbConnection connection); +``` +#### Parameters + + + +`connection` [System.Data.IDbConnection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbConnection 'System.Data.IDbConnection') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md new file mode 100644 index 00000000..21563f0d --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md @@ -0,0 +1,23 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider.CreateLock(string, bool) Method + +Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +is specified, invalid applock names will be escaped/hashed. + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedLock CreateLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md new file mode 100644 index 00000000..2757780b --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md @@ -0,0 +1,23 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool) Method + +Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') +is specified, invalid applock names will be escaped/hashed. + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock CreateReaderWriterLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md new file mode 100644 index 00000000..1c0456fc --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md @@ -0,0 +1,24 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer').[SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') + +## SqlDistributedSynchronizationProvider.CreateSemaphore(string, int) Method + +Constructs an instance of [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') with the provided [name](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).name') and [maxCount](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).maxCount'). + +```csharp +public Medallion.Threading.SqlServer.SqlDistributedSemaphore CreateSemaphore(string name, int maxCount); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + +Implements [CreateSemaphore(string, int)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(System.String,System.Int32)') + +#### Returns +[SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') \ No newline at end of file diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md new file mode 100644 index 00000000..ef2dfd59 --- /dev/null +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md @@ -0,0 +1,32 @@ +#### [DistributedLock.SqlServer](README.md 'README') +### [Medallion.Threading.SqlServer](Medallion.Threading.SqlServer.md 'Medallion.Threading.SqlServer') + +## SqlDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'), +[IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'), +and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore'). + +```csharp +public sealed class SqlDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, +Medallion.Threading.IDistributedReaderWriterLockProvider, +Medallion.Threading.IDistributedSemaphoreProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 SqlDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider'), [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +| Constructors | | +| :--- | :--- | +| [SqlDistributedSynchronizationProvider(string, Action<SqlConnectionOptionsBuilder>)](SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider that connects with [connectionString](SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](SqlDistributedSynchronizationProvider..ctor.uXiGZXEHL3VIEtbm7sJCDw.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).options 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(string, System.Action).options'). | +| [SqlDistributedSynchronizationProvider(IDbConnection)](SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbConnection)') | Constructs a provider that connects with [connection](SqlDistributedSynchronizationProvider..ctor.wIWVEFdYGHcqScaVWCtaYg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbConnection).connection'). | +| [SqlDistributedSynchronizationProvider(IDbTransaction)](SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbTransaction)') | Constructs a provider that connects with [transaction](SqlDistributedSynchronizationProvider..ctor.QbNGXebcf9bdcSs15AJxAg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.SqlDistributedSynchronizationProvider(System.Data.IDbTransaction).transaction'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string, bool)](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid applock names will be escaped/hashed. | +| [CreateReaderWriterLock(string, bool)](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName')
is specified, invalid applock names will be escaped/hashed. | +| [CreateSemaphore(string, int)](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int)') | Constructs an instance of [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') with the provided [name](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).name') and [maxCount](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).maxCount'). | diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md new file mode 100644 index 00000000..0213c265 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md @@ -0,0 +1,28 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock(string, Nullable, bool) Constructor + +Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). + +[abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by +its original owner. The default is 2s. + +Unless [exactName](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public EventWaitHandleDistributedLock(string name, System.Nullable abandonmentCheckCadence=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md similarity index 67% rename from docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md rename to docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md index 71c3b25e..793f94a9 100644 --- a/docs/apiReference/csc50wjfYFMfhVMh9f0p5g.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') ## EventWaitHandleDistributedLock.Acquire(Nullable, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to [Syste Specifies a token by which the wait can be canceled -Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Acquire#Medallion_Threading_IDistributedLock_Acquire_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') #### Returns -[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') -An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file +[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') +An [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md similarity index 67% rename from docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md rename to docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md index 32424f34..d05052cc 100644 --- a/docs/apiReference/Q_XRVgkI_77ehHSwgz3+6g.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') ## EventWaitHandleDistributedLock.AcquireAsync(Nullable, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to [Syste Specifies a token by which the wait can be canceled -Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.AcquireAsync#Medallion_Threading_IDistributedLock_AcquireAsync_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') #### Returns -[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') -An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Name.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Name.md new file mode 100644 index 00000000..82b81bc1 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') + +## EventWaitHandleDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md similarity index 57% rename from docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md rename to docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md index f93cbd56..7746d858 100644 --- a/docs/apiReference/uJMovE7EIAyUhcQlWkoiMg.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') ## EventWaitHandleDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to 0 Specifies a token by which the wait can be canceled -Implements [TryAcquire(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.TryAcquire#Medallion_Threading_IDistributedLock_TryAcquire_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') #### Returns -[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') -An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file +[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') +An [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md similarity index 62% rename from docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md rename to docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md index 80c6b642..5dffe346 100644 --- a/docs/apiReference/bF7Wpky_IL0puVDTMR7U2w.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') ## EventWaitHandleDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to 0 Specifies a token by which the wait can be canceled -Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.TryAcquireAsync#Medallion_Threading_IDistributedLock_TryAcquireAsync_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') #### Returns -[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') -An [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +An [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md new file mode 100644 index 00000000..78295dae --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md @@ -0,0 +1,30 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') + +## EventWaitHandleDistributedLock Class + +A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. + +```csharp +public sealed class EventWaitHandleDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [EventWaitHandleDistributedLock(string, Nullable<TimeSpan>, bool)](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool)') | Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name').

[abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [Name](EventWaitHandleDistributedLock.Name.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.Dispose().md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.Dispose().md new file mode 100644 index 00000000..069a9d47 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') + +## EventWaitHandleDistributedLockHandle.Dispose() Method + +Releases the lock + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.DisposeAsync().md similarity index 60% rename from docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md rename to docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.DisposeAsync().md index 83ef7d9c..76c22616 100644 --- a/docs/apiReference/rAn7UJB4AMy2LlyftHh0jQ.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.DisposeAsync().md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') ## EventWaitHandleDistributedLockHandle.DisposeAsync() Method diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.md new file mode 100644 index 00000000..0f3a42f7 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLockHandle.md @@ -0,0 +1,22 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') + +## EventWaitHandleDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class EventWaitHandleDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Methods | | +| :--- | :--- | +| [Dispose()](EventWaitHandleDistributedLockHandle.Dispose().md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.Dispose()') | Releases the lock | +| [DisposeAsync()](EventWaitHandleDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md b/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md new file mode 100644 index 00000000..1baec3b3 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md @@ -0,0 +1,11 @@ +#### [DistributedLock.WaitHandles](README.md 'README') + +## Medallion.Threading.WaitHandles Namespace + +| Classes | | +| :--- | :--- | +| [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') | A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. | +| [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') | Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') | +| [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock')
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.WaitHandles/README.md b/docs/api/DistributedLock.WaitHandles/README.md new file mode 100644 index 00000000..80d47e42 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.WaitHandles](README.md 'README') + +## DistributedLock.WaitHandles Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') | | diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md new file mode 100644 index 00000000..c6e56d96 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md @@ -0,0 +1,32 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore(string, int, Nullable, bool) Constructor + +Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). + +[abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by +its original owner. The default is 2s. + +Unless [exactName](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. + +```csharp +public WaitHandleDistributedSemaphore(string name, int maxCount, System.Nullable abandonmentCheckCadence=null, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md similarity index 67% rename from docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md rename to docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md index 4057b732..bfef08c4 100644 --- a/docs/apiReference/fanbWVO3U0ELSV89GyikgQ.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') ## WaitHandleDistributedSemaphore.Acquire(Nullable, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to [Syste Specifies a token by which the wait can be canceled -Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Acquire#Medallion_Threading_IDistributedSemaphore_Acquire_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') +Implements [Acquire(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') #### Returns -[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') -A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file +[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') +A [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md similarity index 67% rename from docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md rename to docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md index bd203fb0..a9b83865 100644 --- a/docs/apiReference/k9Mv6k_1m4DGGHNWVI0rSw.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') ## WaitHandleDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to [Syste Specifies a token by which the wait can be canceled -Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.AcquireAsync#Medallion_Threading_IDistributedSemaphore_AcquireAsync_System_Nullable{System_TimeSpan},System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') #### Returns -[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') -A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.MaxCount.md new file mode 100644 index 00000000..d927077c --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.MaxCount.md @@ -0,0 +1,15 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.MaxCount Property + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +```csharp +public int MaxCount { get; } +``` + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Name.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Name.md new file mode 100644 index 00000000..079f98e7 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Name.md @@ -0,0 +1,15 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') + +## WaitHandleDistributedSemaphore.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +```csharp +public string Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') + +#### Property Value +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md similarity index 57% rename from docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md rename to docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md index 07322bd6..e882a193 100644 --- a/docs/apiReference/xAXKRX1HdsJVylWBC_+WmA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') ## WaitHandleDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to 0 Specifies a token by which the wait can be canceled -Implements [TryAcquire(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.TryAcquire#Medallion_Threading_IDistributedSemaphore_TryAcquire_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +Implements [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') #### Returns -[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') -A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file +[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') +A [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md similarity index 62% rename from docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md rename to docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md index 82c534e1..32542c17 100644 --- a/docs/apiReference/nk6f9CuMtAPqAG7F0UWvSA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') ## WaitHandleDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method @@ -29,8 +30,8 @@ How long to wait before giving up on the acquisition attempt. Defaults to 0 Specifies a token by which the wait can be canceled -Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.TryAcquireAsync#Medallion_Threading_IDistributedSemaphore_TryAcquireAsync_System_TimeSpan,System_Threading_CancellationToken_ 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') #### Returns -[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') -A [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md new file mode 100644 index 00000000..2add86f9 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md @@ -0,0 +1,31 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSemaphore Class + +Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') + +```csharp +public sealed class WaitHandleDistributedSemaphore : +Medallion.Threading.IDistributedSemaphore +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphore + +Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +| Constructors | | +| :--- | :--- | +| [WaitHandleDistributedSemaphore(string, int, Nullable<TimeSpan>, bool)](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool)') | Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name').

[abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | + +| Properties | | +| :--- | :--- | +| [MaxCount](WaitHandleDistributedSemaphore.MaxCount.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.MaxCount') | Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | +| [Name](WaitHandleDistributedSemaphore.Name.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') | + +| Methods | | +| :--- | :--- | +| [Acquire(Nullable<TimeSpan>, CancellationToken)](WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquire(TimeSpan, CancellationToken)](WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.Dispose().md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.Dispose().md new file mode 100644 index 00000000..4c9dd17a --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.Dispose().md @@ -0,0 +1,12 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') + +## WaitHandleDistributedSemaphoreHandle.Dispose() Method + +Releases the semaphore ticket + +```csharp +public void Dispose(); +``` + +Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.DisposeAsync().md similarity index 60% rename from docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md rename to docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.DisposeAsync().md index d5bc4079..23f8bfc0 100644 --- a/docs/apiReference/GYxpHZnJiw9JgevQ9jPjWg.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.DisposeAsync().md @@ -1,4 +1,5 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') ## WaitHandleDistributedSemaphoreHandle.DisposeAsync() Method diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.HandleLostToken.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.HandleLostToken.md new file mode 100644 index 00000000..b0d685b4 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') + +## WaitHandleDistributedSemaphoreHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.md new file mode 100644 index 00000000..d664c724 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphoreHandle.md @@ -0,0 +1,26 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSemaphoreHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class WaitHandleDistributedSemaphoreHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphoreHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](WaitHandleDistributedSemaphoreHandle.HandleLostToken.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [Dispose()](WaitHandleDistributedSemaphoreHandle.Dispose().md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.Dispose()') | Releases the semaphore ticket | +| [DisposeAsync()](WaitHandleDistributedSemaphoreHandle.DisposeAsync().md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.DisposeAsync()') | Releases the semaphore ticket | diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md new file mode 100644 index 00000000..3672cb01 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md @@ -0,0 +1,15 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider(Nullable) Constructor + +Constructs a [WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). + +```csharp +public WaitHandleDistributedSynchronizationProvider(System.Nullable abandonmentCheckCadence=null); +``` +#### Parameters + + + +`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md new file mode 100644 index 00000000..38e6338e --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md @@ -0,0 +1,23 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool) Method + +Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless +[exactName](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. + +```csharp +public Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock CreateLock(string name, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md new file mode 100644 index 00000000..43a0f116 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md @@ -0,0 +1,28 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') + +## WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool) Method + +Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') +and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait +handle names will be escaped/hashed. + +```csharp +public Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore CreateSemaphore(string name, int maxCount, bool exactName=false); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + +#### Returns +[WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') \ No newline at end of file diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md new file mode 100644 index 00000000..dfff3eb8 --- /dev/null +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md @@ -0,0 +1,26 @@ +#### [DistributedLock.WaitHandles](README.md 'README') +### [Medallion.Threading.WaitHandles](Medallion.Threading.WaitHandles.md 'Medallion.Threading.WaitHandles') + +## WaitHandleDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). + +```csharp +public sealed class WaitHandleDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedSemaphoreProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +| Constructors | | +| :--- | :--- | +| [WaitHandleDistributedSynchronizationProvider(Nullable<TimeSpan>)](WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable)') | Constructs a [WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](WaitHandleDistributedSynchronizationProvider..ctor.e6xRwWsJppw/KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). | + +| Methods | | +| :--- | :--- | +| [CreateLock(string, bool)](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless
[exactName](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | +| [CreateSemaphore(string, int, bool)](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool)') | Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name')
and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait
handle names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md b/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md new file mode 100644 index 00000000..a10fed32 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md @@ -0,0 +1,18 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') + +## Medallion.Threading.ZooKeeper Namespace + +| Classes | | +| :--- | :--- | +| [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') | An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in
https://zookeeper.apache.org/doc/r3.1.2/recipes.html | +| [ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') | A distributed reader-writer lock based on the ZooKeeper shared lock recipe (https://zookeeper.apache.org/doc/current/recipes.html). | +| [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') | An implementation of [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') based on ZooKeeper. Uses an approach similar to [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'). | +| [ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | +| [ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') | Options for configuring ZooKeeper-based synchronization primitives | +| [ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'),
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore'). | + +| Structs | | +| :--- | :--- | +| [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') | Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path.
Call [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') to get the path value. | diff --git a/docs/api/DistributedLock.ZooKeeper/README.md b/docs/api/DistributedLock.ZooKeeper/README.md new file mode 100644 index 00000000..a26328e5 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/README.md @@ -0,0 +1,7 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') + +## DistributedLock.ZooKeeper Assembly + +| Namespaces | | +| :--- | :--- | +| [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') | | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md new file mode 100644 index 00000000..be4d0fe7 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock(ZooKeeperPath, string, bool, Action) Constructor + +Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +deleted after releasing (defaults to false). + +```csharp +public ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath path, string connectionString, bool assumePathExists=false, System.Action? options=null); +``` +#### Parameters + + + +`path` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`assumePathExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md new file mode 100644 index 00000000..d7ae088a --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md @@ -0,0 +1,26 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock(string, string, Action) Constructor + +Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options'). + +The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedLock(string name, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md new file mode 100644 index 00000000..e5253052 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock(ZooKeeperPath, string, string, Action) Constructor + +Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). + +The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath directoryPath, string name, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`directoryPath` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md new file mode 100644 index 00000000..e8494411 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock.AcquireAsync(Nullable, CancellationToken) Method + +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md new file mode 100644 index 00000000..4d1037d6 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact +that this will include the leading "/" and base directory alongside the passed-in name. + +```csharp +string Medallion.Threading.IDistributedLock.Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Path.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Path.md new file mode 100644 index 00000000..ccdff704 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Path.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock.Path Property + +The zookeeper node path + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperPath Path { get; } +``` + +#### Property Value +[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md new file mode 100644 index 00000000..8512b451 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') + +## ZooKeeperDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md new file mode 100644 index 00000000..7d8f7510 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md @@ -0,0 +1,35 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedLock Class + +An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in +https://zookeeper.apache.org/doc/r3.1.2/recipes.html + +```csharp +public sealed class ZooKeeperDistributedLock : +Medallion.Threading.IDistributedLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedLock + +Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') + +| Constructors | | +| :--- | :--- | +| [ZooKeeperDistributedLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | +| [ZooKeeperDistributedLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options').

The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options').

The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | + +| Properties | | +| :--- | :--- | +| [Path](ZooKeeperDistributedLock.Path.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.Path') | The zookeeper node path | + +| Methods | | +| :--- | :--- | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [Medallion.Threading.IDistributedLock.Name](ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.DisposeAsync().md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.DisposeAsync().md new file mode 100644 index 00000000..7ffe9f97 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') + +## ZooKeeperDistributedLockHandle.DisposeAsync() Method + +Releases the lock + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.HandleLostToken.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.HandleLostToken.md new file mode 100644 index 00000000..18a694f4 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') + +## ZooKeeperDistributedLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.md new file mode 100644 index 00000000..889bd301 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLockHandle.md @@ -0,0 +1,25 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class ZooKeeperDistributedLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](ZooKeeperDistributedLockHandle.HandleLostToken.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [DisposeAsync()](ZooKeeperDistributedLockHandle.DisposeAsync().md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle.DisposeAsync()') | Releases the lock | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md new file mode 100644 index 00000000..f67a14d5 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, string, Action) Constructor + +Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). + +The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath directoryPath, string name, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`directoryPath` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md new file mode 100644 index 00000000..16f2bbd6 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, bool, Action) Constructor + +Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +deleted after releasing (defaults to false). + +```csharp +public ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath path, string connectionString, bool assumePathExists=false, System.Action? options=null); +``` +#### Parameters + + + +`path` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`assumePathExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md new file mode 100644 index 00000000..40264875 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md @@ -0,0 +1,26 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock(string, string, Action) Constructor + +Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options'). + +The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedReaderWriterLock(string name, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md new file mode 100644 index 00000000..e12ebdbe --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method + +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireReadLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md new file mode 100644 index 00000000..5cded601 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method + +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireWriteLockAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') which can be used to release the lock \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md new file mode 100644 index 00000000..dfee8655 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact +that this will include the leading "/" and base directory alongside the passed-in name. + +```csharp +string Medallion.Threading.IDistributedReaderWriterLock.Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Path.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Path.md new file mode 100644 index 00000000..43af9eeb --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Path.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.Path Property + +The zookeeper node path + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperPath Path { get; } +``` + +#### Property Value +[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md new file mode 100644 index 00000000..1bbbe50c --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireReadLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md new file mode 100644 index 00000000..c0510329 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') + +## ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireWriteLockAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') which can be used to release the lock or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md new file mode 100644 index 00000000..d9b8b24c --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md @@ -0,0 +1,36 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedReaderWriterLock Class + +A distributed reader-writer lock based on the ZooKeeper shared lock recipe (https://zookeeper.apache.org/doc/current/recipes.html). + +```csharp +public sealed class ZooKeeperDistributedReaderWriterLock : +Medallion.Threading.IDistributedReaderWriterLock +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedReaderWriterLock + +Implements [IDistributedReaderWriterLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') + +| Constructors | | +| :--- | :--- | +| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | +| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options').

The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedReaderWriterLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options').

The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | + +| Properties | | +| :--- | :--- | +| [Path](ZooKeeperDistributedReaderWriterLock.Path.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.Path') | The zookeeper node path | + +| Methods | | +| :--- | :--- | +| [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | +| [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: | +| [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [Medallion.Threading.IDistributedReaderWriterLock.Name](ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync().md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync().md new file mode 100644 index 00000000..17c393f3 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') + +## ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync() Method + +Releases the lock + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken.md new file mode 100644 index 00000000..a63346a2 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') + +## ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.md new file mode 100644 index 00000000..07421830 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLockHandle.md @@ -0,0 +1,25 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedReaderWriterLockHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class ZooKeeperDistributedReaderWriterLockHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedReaderWriterLockHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [DisposeAsync()](ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync().md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle.DisposeAsync()') | Releases the lock | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md new file mode 100644 index 00000000..2f494b2c --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md @@ -0,0 +1,34 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore(ZooKeeperPath, int, string, bool, Action) Constructor + +Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +deleted after releasing (defaults to false). + +```csharp +public ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath path, int maxCount, string connectionString, bool assumePathExists=false, System.Action? options=null); +``` +#### Parameters + + + +`path` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`assumePathExists` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md new file mode 100644 index 00000000..fdc93e17 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md @@ -0,0 +1,34 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore(ZooKeeperPath, string, int, string, Action) Constructor + +Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options'). + +The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath directoryPath, string name, int maxCount, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`directoryPath` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md new file mode 100644 index 00000000..06fbb485 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore(string, int, string, Action) Constructor + +Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options'). + +The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure +validity. + +```csharp +public ZooKeeperDistributedSemaphore(string name, int maxCount, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md new file mode 100644 index 00000000..950565af --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method + +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket +``` + +```csharp +public System.Threading.Tasks.ValueTask AcquireAsync(System.Nullable timeout=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') + +How long to wait before giving up on the acquisition attempt. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') which can be used to release the ticket \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.MaxCount.md new file mode 100644 index 00000000..cc1bf303 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.MaxCount.md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore.MaxCount Property + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +```csharp +public int MaxCount { get; } +``` + +Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') + +#### Property Value +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md new file mode 100644 index 00000000..aad3ffee --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name Property + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact +that this will include the leading "/" and base directory alongside the passed-in name. + +```csharp +string Medallion.Threading.IDistributedSemaphore.Name { get; } +``` + +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Path.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Path.md new file mode 100644 index 00000000..b9335d65 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Path.md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore.Path Property + +The zookeeper node path + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperPath Path { get; } +``` + +#### Property Value +[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md new file mode 100644 index 00000000..d14abd55 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md @@ -0,0 +1,37 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') + +## ZooKeeperDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method + +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it +``` + +```csharp +public System.Threading.Tasks.ValueTask TryAcquireAsync(System.TimeSpan timeout=default(System.TimeSpan), System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)); +``` +#### Parameters + + + +`timeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +How long to wait before giving up on the acquisition attempt. Defaults to 0 + + + +`cancellationToken` [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') + +Specifies a token by which the wait can be canceled + +Implements [TryAcquireAsync(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan,System.Threading.CancellationToken)') + +#### Returns +[System.Threading.Tasks.ValueTask<](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1')[ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask-1 'System.Threading.Tasks.ValueTask`1') +A [ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') which can be used to release the ticket or null on failure \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md new file mode 100644 index 00000000..d6611673 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md @@ -0,0 +1,35 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedSemaphore Class + +An implementation of [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') based on ZooKeeper. Uses an approach similar to [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'). + +```csharp +public sealed class ZooKeeperDistributedSemaphore : +Medallion.Threading.IDistributedSemaphore +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedSemaphore + +Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') + +| Constructors | | +| :--- | :--- | +| [ZooKeeperDistributedSemaphore(ZooKeeperPath, int, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action)') | Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | +| [ZooKeeperDistributedSemaphore(ZooKeeperPath, string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action)') | Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options').

The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedSemaphore(string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action)') | Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options').

The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | + +| Properties | | +| :--- | :--- | +| [MaxCount](ZooKeeperDistributedSemaphore.MaxCount.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.MaxCount') | Implements [MaxCount](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | +| [Path](ZooKeeperDistributedSemaphore.Path.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.Path') | The zookeeper node path | + +| Methods | | +| :--- | :--- | +| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | +| [TryAcquireAsync(TimeSpan, CancellationToken)](ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | + +| Explicit Interface Implementations | | +| :--- | :--- | +| [Medallion.Threading.IDistributedSemaphore.Name](ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.DisposeAsync().md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.DisposeAsync().md new file mode 100644 index 00000000..38184e66 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.DisposeAsync().md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') + +## ZooKeeperDistributedSemaphoreHandle.DisposeAsync() Method + +Releases the semaphore + +```csharp +public System.Threading.Tasks.ValueTask DisposeAsync(); +``` + +Implements [DisposeAsync()](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable.DisposeAsync 'System.IAsyncDisposable.DisposeAsync') + +#### Returns +[System.Threading.Tasks.ValueTask](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.ValueTask 'System.Threading.Tasks.ValueTask') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.HandleLostToken.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.HandleLostToken.md new file mode 100644 index 00000000..2e801043 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.HandleLostToken.md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') + +## ZooKeeperDistributedSemaphoreHandle.HandleLostToken Property + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +```csharp +public System.Threading.CancellationToken HandleLostToken { get; } +``` + +Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') + +#### Property Value +[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.md new file mode 100644 index 00000000..48e8f938 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphoreHandle.md @@ -0,0 +1,25 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedSemaphoreHandle Class + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') + +```csharp +public sealed class ZooKeeperDistributedSemaphoreHandle : +Medallion.Threading.IDistributedSynchronizationHandle, +System.IDisposable, +System.IAsyncDisposable +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedSemaphoreHandle + +Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') + +| Properties | | +| :--- | :--- | +| [HandleLostToken](ZooKeeperDistributedSemaphoreHandle.HandleLostToken.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle.HandleLostToken') | Implements [HandleLostToken](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | + +| Methods | | +| :--- | :--- | +| [DisposeAsync()](ZooKeeperDistributedSemaphoreHandle.DisposeAsync().md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle.DisposeAsync()') | Releases the semaphore | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md new file mode 100644 index 00000000..fdd24b91 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md @@ -0,0 +1,29 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') + +## ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl(string, string, int) Method + +Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control +list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs. + +If no ACL entries are specified, the ACL used will be a singleton list that grants all permissions to (world, anyone). + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder AddAccessControl(string scheme, string id, int permissionFlags); +``` +#### Parameters + + + +`scheme` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`id` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`permissionFlags` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + +#### Returns +[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md new file mode 100644 index 00000000..00b1a2dd --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md @@ -0,0 +1,26 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') + +## ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo(string, IReadOnlyList) Method + +Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call +to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more +information on ZooKeeper auth. + +By default, no auth info is added. + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder AddAuthInfo(string scheme, System.Collections.Generic.IReadOnlyList auth); +``` +#### Parameters + + + +`scheme` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`auth` [System.Collections.Generic.IReadOnlyList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IReadOnlyList-1 'System.Collections.Generic.IReadOnlyList`1')[System.Byte](https://docs.microsoft.com/en-us/dotnet/api/System.Byte 'System.Byte')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IReadOnlyList-1 'System.Collections.Generic.IReadOnlyList`1') + +#### Returns +[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md new file mode 100644 index 00000000..82bb6b16 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md @@ -0,0 +1,20 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') + +## ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout(TimeSpan) Method + +Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException'). + +Defaults to 15s. + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder ConnectTimeout(System.TimeSpan connectTimeout); +``` +#### Parameters + + + +`connectTimeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md new file mode 100644 index 00000000..02669eea --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md @@ -0,0 +1,22 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') + +## ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(TimeSpan) Method + +Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews +the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash +of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock. + +Defaults to 20s. + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder SessionTimeout(System.TimeSpan sessionTimeout); +``` +#### Parameters + + + +`sessionTimeout` [System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan') + +#### Returns +[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md new file mode 100644 index 00000000..fd19ef72 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md @@ -0,0 +1,19 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedSynchronizationOptionsBuilder Class + +Options for configuring ZooKeeper-based synchronization primitives + +```csharp +public sealed class ZooKeeperDistributedSynchronizationOptionsBuilder +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedSynchronizationOptionsBuilder + +| Methods | | +| :--- | :--- | +| [AddAccessControl(string, string, int)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl(string, string, int)') | Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control
list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs.

If no ACL entries are specified, the ACL used will be a singleton list that grants all permissions to (world, anyone). | +| [AddAuthInfo(string, IReadOnlyList<byte>)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo(string, System.Collections.Generic.IReadOnlyList)') | Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call
to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more
information on ZooKeeper auth.

By default, no auth info is added. | +| [ConnectTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout(System.TimeSpan)') | Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException').

Defaults to 15s. | +| [SessionTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan)') | Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews
the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash
of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock.

Defaults to 20s. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md new file mode 100644 index 00000000..74527245 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md @@ -0,0 +1,24 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') + +## ZooKeeperDistributedSynchronizationProvider(ZooKeeperPath, string, Action) Constructor + +Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created +in [directoryPath](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).directoryPath'). + +```csharp +public ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath directoryPath, string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`directoryPath` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md new file mode 100644 index 00000000..b6820017 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md @@ -0,0 +1,20 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') + +## ZooKeeperDistributedSynchronizationProvider(string, Action) Constructor + +Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created +in the root directory '/'. + +```csharp +public ZooKeeperDistributedSynchronizationProvider(string connectionString, System.Action? options=null); +``` +#### Parameters + + + +`connectionString` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`options` [System.Action<](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md new file mode 100644 index 00000000..46893e25 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md @@ -0,0 +1,20 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') + +## ZooKeeperDistributedSynchronizationProvider.CreateLock(string) Method + +Creates a [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateLock(string).name'). + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock CreateLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +Implements [CreateLock(string)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(System.String)') + +#### Returns +[ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md new file mode 100644 index 00000000..bf162767 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md @@ -0,0 +1,20 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') + +## ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string) Method + +Creates a [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string).name'). + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock CreateReaderWriterLock(string name); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +Implements [CreateReaderWriterLock(string)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(System.String)') + +#### Returns +[ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateSemaphore/8MW9887Y7GcGqa+mUYdzQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateSemaphore/8MW9887Y7GcGqa+mUYdzQ.md new file mode 100644 index 00000000..1e684651 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.CreateSemaphore/8MW9887Y7GcGqa+mUYdzQ.md @@ -0,0 +1,24 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') + +## ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int) Method + +Creates a [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateSemaphore./8MW9887Y7GcGqa+mUYdzQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string,int).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int).name') and [maxCount](ZooKeeperDistributedSynchronizationProvider.CreateSemaphore./8MW9887Y7GcGqa+mUYdzQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string,int).maxCount 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int).maxCount'). + +```csharp +public Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore CreateSemaphore(string name, int maxCount); +``` +#### Parameters + + + +`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + + +`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') + +Implements [CreateSemaphore(string, int)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(System.String,System.Int32)') + +#### Returns +[ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md new file mode 100644 index 00000000..f9a605dc --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperDistributedSynchronizationProvider Class + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'), +[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'), +and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore'). + +```csharp +public sealed class ZooKeeperDistributedSynchronizationProvider : +Medallion.Threading.IDistributedLockProvider, +Medallion.Threading.IDistributedReaderWriterLockProvider, +Medallion.Threading.IDistributedSemaphoreProvider +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 ZooKeeperDistributedSynchronizationProvider + +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider'), [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') + +| Constructors | | +| :--- | :--- | +| [ZooKeeperDistributedSynchronizationProvider(ZooKeeperPath, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created
in [directoryPath](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).directoryPath'). | +| [ZooKeeperDistributedSynchronizationProvider(string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created
in the root directory '/'. | + +| Methods | | +| :--- | :--- | +| [CreateLock(string)](ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateLock(string)') | Creates a [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateLock.F3xNt1712Th0LXGKBIudtA.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateLock(string).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateLock(string).name'). | +| [CreateReaderWriterLock(string)](ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string)') | Creates a [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock.bhwTUdcK1w3Lu0/2I6g3IA.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateReaderWriterLock(string).name'). | +| [CreateSemaphore(string, int)](ZooKeeperDistributedSynchronizationProvider.CreateSemaphore./8MW9887Y7GcGqa+mUYdzQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int)') | Creates a [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') using the given [name](ZooKeeperDistributedSynchronizationProvider.CreateSemaphore./8MW9887Y7GcGqa+mUYdzQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string,int).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int).name') and [maxCount](ZooKeeperDistributedSynchronizationProvider.CreateSemaphore./8MW9887Y7GcGqa+mUYdzQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string,int).maxCount 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.CreateSemaphore(string, int).maxCount'). | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md new file mode 100644 index 00000000..f842b495 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md @@ -0,0 +1,15 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath(string) Constructor + +Constructs a new [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') based on the given [path](ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md#Medallion.Threading.ZooKeeper.ZooKeeperPath.ZooKeeperPath(string).path 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ZooKeeperPath(string).path') string. + +```csharp +public ZooKeeperPath(string path); +``` +#### Parameters + + + +`path` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.J5/wqdQppznvVwiU3kq31Q.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.J5/wqdQppznvVwiU3kq31Q.md new file mode 100644 index 00000000..43515515 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.J5/wqdQppznvVwiU3kq31Q.md @@ -0,0 +1,18 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.Equals(object) Method + +Implements equality based on the path string + +```csharp +public override bool Equals(object obj); +``` +#### Parameters + + + +`obj` [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md new file mode 100644 index 00000000..c87be9a0 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md @@ -0,0 +1,18 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.Equals(ZooKeeperPath) Method + +Implements equality based on the path string + +```csharp +public bool Equals(Medallion.Threading.ZooKeeper.ZooKeeperPath that); +``` +#### Parameters + + + +`that` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.GetHashCode().md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.GetHashCode().md new file mode 100644 index 00000000..0b990ff0 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.GetHashCode().md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.GetHashCode() Method + +Implements hashing based on the path string + +```csharp +public override int GetHashCode(); +``` + +#### Returns +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.ToString().md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.ToString().md new file mode 100644 index 00000000..2bffda1f --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.ToString().md @@ -0,0 +1,13 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.ToString() Method + +Returns the path value as a string + +```csharp +public override string ToString(); +``` + +#### Returns +[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md new file mode 100644 index 00000000..e895f4e7 --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md @@ -0,0 +1,30 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper') + +## ZooKeeperPath Struct + +Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path. +Call [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') to get the path value. + +```csharp +public readonly struct ZooKeeperPath : +System.IEquatable +``` + +Implements [System.IEquatable<](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System.IEquatable`1')[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath')[>](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1 'System.IEquatable`1') + +| Constructors | | +| :--- | :--- | +| [ZooKeeperPath(string)](ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ZooKeeperPath(string)') | Constructs a new [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') based on the given [path](ZooKeeperPath..ctor.ZsFWJSkmkGB08MbVdjFPyw.md#Medallion.Threading.ZooKeeper.ZooKeeperPath.ZooKeeperPath(string).path 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ZooKeeperPath(string).path') string. | + +| Methods | | +| :--- | :--- | +| [Equals(ZooKeeperPath)](ZooKeeperPath.Equals.VVXwkPSRrVJ19AkTFg5+xw.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.Equals(Medallion.Threading.ZooKeeper.ZooKeeperPath)') | Implements equality based on the path string | +| [Equals(object)](ZooKeeperPath.Equals.J5/wqdQppznvVwiU3kq31Q.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.Equals(object)') | Implements equality based on the path string | +| [GetHashCode()](ZooKeeperPath.GetHashCode().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.GetHashCode()') | Implements hashing based on the path string | +| [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') | Returns the path value as a string | + +| Operators | | +| :--- | :--- | +| [operator ==(ZooKeeperPath, ZooKeeperPath)](ZooKeeperPath.op_Equality.0Gh9Mk6h/aa6pYstqDJebg.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.op_Equality(Medallion.Threading.ZooKeeper.ZooKeeperPath, Medallion.Threading.ZooKeeper.ZooKeeperPath)') | Implements equality based on the path string | +| [operator !=(ZooKeeperPath, ZooKeeperPath)](ZooKeeperPath.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.op_Inequality(Medallion.Threading.ZooKeeper.ZooKeeperPath, Medallion.Threading.ZooKeeper.ZooKeeperPath)') | Implements inequality based on the path string | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Equality.0Gh9Mk6h/aa6pYstqDJebg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Equality.0Gh9Mk6h/aa6pYstqDJebg.md new file mode 100644 index 00000000..921391dd --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Equality.0Gh9Mk6h/aa6pYstqDJebg.md @@ -0,0 +1,22 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.operator ==(ZooKeeperPath, ZooKeeperPath) Operator + +Implements equality based on the path string + +```csharp +public static bool operator ==(Medallion.Threading.ZooKeeper.ZooKeeperPath @this, Medallion.Threading.ZooKeeper.ZooKeeperPath that); +``` +#### Parameters + + + +`this` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`that` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md new file mode 100644 index 00000000..fc06c8da --- /dev/null +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.op_Inequality.hyYJhclLXAbXbwzJmpT2JA.md @@ -0,0 +1,22 @@ +#### [DistributedLock.ZooKeeper](README.md 'README') +### [Medallion.Threading.ZooKeeper](Medallion.Threading.ZooKeeper.md 'Medallion.Threading.ZooKeeper').[ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +## ZooKeeperPath.operator !=(ZooKeeperPath, ZooKeeperPath) Operator + +Implements inequality based on the path string + +```csharp +public static bool operator !=(Medallion.Threading.ZooKeeper.ZooKeeperPath @this, Medallion.Threading.ZooKeeper.ZooKeeperPath that); +``` +#### Parameters + + + +`this` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + + + +`that` [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') + +#### Returns +[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md b/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md deleted file mode 100644 index 49a9d61c..00000000 --- a/docs/apiReference/+f5b_NJBO_BPj27n2I4gbA.md +++ /dev/null @@ -1,22 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') - -## WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool) Method - -Creates a [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless -[exactName](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. - -```csharp -public Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock CreateLock(string name, bool exactName=false); -``` -#### Parameters - - - -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - - -`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -#### Returns -[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') \ No newline at end of file diff --git a/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md b/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md deleted file mode 100644 index 9eb996ed..00000000 --- a/docs/apiReference/0cv6wmZCIva5FK3cOR8t5g.md +++ /dev/null @@ -1,9 +0,0 @@ -## Medallion.Threading.WaitHandles Namespace - -| Classes | | -| :--- | :--- | -| [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') | A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. | -| [EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') | Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') | Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') | -| [WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') | Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') | Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock')
and [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). | diff --git a/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md b/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md deleted file mode 100644 index 68bb5f30..00000000 --- a/docs/apiReference/0dCx0_H_hZmWHCpWnBDJvg.md +++ /dev/null @@ -1,14 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') - -## EventWaitHandleDistributedLock.Name Property - -Implements [Medallion.Threading.IDistributedLock.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') - -```csharp -public string Name { get; } -``` - -Implements [Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') - -#### Property Value -[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md b/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md deleted file mode 100644 index 0f6b0589..00000000 --- a/docs/apiReference/0x7_KsBHsL2asMDmCVsGJw.md +++ /dev/null @@ -1,11 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') - -## WaitHandleDistributedSemaphoreHandle.Dispose() Method - -Releases the semaphore ticket - -```csharp -public void Dispose(); -``` - -Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md b/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md deleted file mode 100644 index 17eaa78f..00000000 --- a/docs/apiReference/2Tva732RJcbYY7yOGc2Dtg.md +++ /dev/null @@ -1,27 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') - -## EventWaitHandleDistributedLock(string, Nullable, bool) Constructor - -Constructs a lock with the given [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). - -[abandonmentCheckCadence](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by -its original owner. The default is 2s. - -Unless [exactName](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. - -```csharp -public EventWaitHandleDistributedLock(string name, System.Nullable abandonmentCheckCadence=null, bool exactName=false); -``` -#### Parameters - - - -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - - -`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') - - - -`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md b/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md deleted file mode 100644 index f74097d5..00000000 --- a/docs/apiReference/4ysEtsHFYQ8UNvnVKspCjg.md +++ /dev/null @@ -1,31 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') - -## WaitHandleDistributedSemaphore(string, int, Nullable, bool) Constructor - -Constructs a lock with the given [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). - -[abandonmentCheckCadence](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by -its original owner. The default is 2s. - -Unless [exactName](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. - -```csharp -public WaitHandleDistributedSemaphore(string name, int maxCount, System.Nullable abandonmentCheckCadence=null, bool exactName=false); -``` -#### Parameters - - - -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - - -`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - - -`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') - - - -`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') \ No newline at end of file diff --git a/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md b/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md deleted file mode 100644 index 6f1cac35..00000000 --- a/docs/apiReference/DrkUdCA1HTHqv41YDxrv5w.md +++ /dev/null @@ -1,14 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') - -## WaitHandleDistributedSemaphore.Name Property - -Implements [Medallion.Threading.IDistributedSemaphore.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') - -```csharp -public string Name { get; } -``` - -Implements [Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') - -#### Property Value -[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') \ No newline at end of file diff --git a/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md b/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md deleted file mode 100644 index 2a113707..00000000 --- a/docs/apiReference/LMZafb40QNKPqmMgiWZRCw.md +++ /dev/null @@ -1,29 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') - -## EventWaitHandleDistributedLock Class - -A distributed lock based on a global [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') on Windows. - -```csharp -public sealed class EventWaitHandleDistributedLock : -Medallion.Threading.IDistributedLock -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLock - -Implements [Medallion.Threading.IDistributedLock](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock 'Medallion.Threading.IDistributedLock') - -| Constructors | | -| :--- | :--- | -| [EventWaitHandleDistributedLock(string, Nullable<TimeSpan>, bool)](2Tva732RJcbYY7yOGc2Dtg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool)') | Constructs a lock with the given [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name').

[abandonmentCheckCadence](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | - -| Properties | | -| :--- | :--- | -| [Name](0dCx0_H_hZmWHCpWnBDJvg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Name') | Implements [Medallion.Threading.IDistributedLock.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLock.Name 'Medallion.Threading.IDistributedLock.Name') | - -| Methods | | -| :--- | :--- | -| [Acquire(Nullable<TimeSpan>, CancellationToken)](csc50wjfYFMfhVMh9f0p5g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | -| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](Q_XRVgkI_77ehHSwgz3+6g.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | -| [TryAcquire(TimeSpan, CancellationToken)](uJMovE7EIAyUhcQlWkoiMg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock synchronously. Usage: | -| [TryAcquireAsync(TimeSpan, CancellationToken)](bF7Wpky_IL0puVDTMR7U2w.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire the lock asynchronously. Usage: | diff --git a/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md b/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md deleted file mode 100644 index 0bf32e8c..00000000 --- a/docs/apiReference/Qzz0SP9O_CPbKNcEYp4rNQ.md +++ /dev/null @@ -1,25 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') - -## WaitHandleDistributedSemaphoreHandle Class - -Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') - -```csharp -public sealed class WaitHandleDistributedSemaphoreHandle : -Medallion.Threading.IDistributedSynchronizationHandle, -System.IDisposable, -System.IAsyncDisposable -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphoreHandle - -Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') - -| Properties | | -| :--- | :--- | -| [HandleLostToken](T+UrsDheZiy67KGBnvRJ2w.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.HandleLostToken') | Implements [Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | - -| Methods | | -| :--- | :--- | -| [Dispose()](0x7_KsBHsL2asMDmCVsGJw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.Dispose()') | Releases the semaphore ticket | -| [DisposeAsync()](GYxpHZnJiw9JgevQ9jPjWg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle.DisposeAsync()') | Releases the semaphore ticket | diff --git a/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md b/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md deleted file mode 100644 index 0fcc6ef8..00000000 --- a/docs/apiReference/T+UrsDheZiy67KGBnvRJ2w.md +++ /dev/null @@ -1,14 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphoreHandle](Qzz0SP9O_CPbKNcEYp4rNQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') - -## WaitHandleDistributedSemaphoreHandle.HandleLostToken Property - -Implements [Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') - -```csharp -public System.Threading.CancellationToken HandleLostToken { get; } -``` - -Implements [HandleLostToken](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') - -#### Property Value -[System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') \ No newline at end of file diff --git a/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md b/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md deleted file mode 100644 index 0a6582a1..00000000 --- a/docs/apiReference/TGomeSLpasysM1hnh_3gqw.md +++ /dev/null @@ -1,11 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[EventWaitHandleDistributedLockHandle](ZmMZk+Ogw3TEy3Qj+BHNOg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') - -## EventWaitHandleDistributedLockHandle.Dispose() Method - -Releases the lock - -```csharp -public void Dispose(); -``` - -Implements [Dispose()](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable.Dispose 'System.IDisposable.Dispose') \ No newline at end of file diff --git a/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md b/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md deleted file mode 100644 index ec046de8..00000000 --- a/docs/apiReference/UsS2hO+xXgwbwvK7JBT0hA.md +++ /dev/null @@ -1,25 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') - -## WaitHandleDistributedSynchronizationProvider Class - -Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') -and [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). - -```csharp -public sealed class WaitHandleDistributedSynchronizationProvider : -Medallion.Threading.IDistributedLockProvider, -Medallion.Threading.IDistributedSemaphoreProvider -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSynchronizationProvider - -Implements [Medallion.Threading.IDistributedLockProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedLockProvider 'Medallion.Threading.IDistributedLockProvider'), [Medallion.Threading.IDistributedSemaphoreProvider](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphoreProvider 'Medallion.Threading.IDistributedSemaphoreProvider') - -| Constructors | | -| :--- | :--- | -| [WaitHandleDistributedSynchronizationProvider(Nullable<TimeSpan>)](e6xRwWsJppw_KT0BMNM9Fg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable)') | Constructs a [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](e6xRwWsJppw_KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). | - -| Methods | | -| :--- | :--- | -| [CreateLock(string, bool)](+f5b_NJBO_BPj27n2I4gbA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [EventWaitHandleDistributedLock](LMZafb40QNKPqmMgiWZRCw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless
[exactName](+f5b_NJBO_BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | -| [CreateSemaphore(string, int, bool)](lScE6Nm5quO4w5D+oiHGrA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool)') | Creates a [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name')
and [maxCount](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait
handle names will be escaped/hashed. | diff --git a/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md b/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md deleted file mode 100644 index 8a86c0f4..00000000 --- a/docs/apiReference/ZmMZk+Ogw3TEy3Qj+BHNOg.md +++ /dev/null @@ -1,21 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') - -## EventWaitHandleDistributedLockHandle Class - -Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle') - -```csharp -public sealed class EventWaitHandleDistributedLockHandle : -Medallion.Threading.IDistributedSynchronizationHandle, -System.IDisposable, -System.IAsyncDisposable -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EventWaitHandleDistributedLockHandle - -Implements [Medallion.Threading.IDistributedSynchronizationHandle](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSynchronizationHandle 'Medallion.Threading.IDistributedSynchronizationHandle'), [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable 'System.IDisposable'), [System.IAsyncDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IAsyncDisposable 'System.IAsyncDisposable') - -| Methods | | -| :--- | :--- | -| [Dispose()](TGomeSLpasysM1hnh_3gqw.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.Dispose()') | Releases the lock | -| [DisposeAsync()](rAn7UJB4AMy2LlyftHh0jQ.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle.DisposeAsync()') | Releases the lock asynchronously | diff --git a/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md b/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md deleted file mode 100644 index 13f95abe..00000000 --- a/docs/apiReference/_eKAd9KmIbGvBAAhA9RhEw.md +++ /dev/null @@ -1,14 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') - -## WaitHandleDistributedSemaphore.MaxCount Property - -Implements [Medallion.Threading.IDistributedSemaphore.MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') - -```csharp -public int MaxCount { get; } -``` - -Implements [MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') - -#### Property Value -[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') \ No newline at end of file diff --git a/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md b/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md deleted file mode 100644 index a7957743..00000000 --- a/docs/apiReference/e6xRwWsJppw_KT0BMNM9Fg.md +++ /dev/null @@ -1,14 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') - -## WaitHandleDistributedSynchronizationProvider(Nullable) Constructor - -Constructs a [WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') using the provided [abandonmentCheckCadence](e6xRwWsJppw_KT0BMNM9Fg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable_System.TimeSpan_).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.WaitHandleDistributedSynchronizationProvider(System.Nullable).abandonmentCheckCadence'). - -```csharp -public WaitHandleDistributedSynchronizationProvider(System.Nullable abandonmentCheckCadence=null); -``` -#### Parameters - - - -`abandonmentCheckCadence` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.TimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan 'System.TimeSpan')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') \ No newline at end of file diff --git a/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md b/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md deleted file mode 100644 index 10349146..00000000 --- a/docs/apiReference/lScE6Nm5quO4w5D+oiHGrA.md +++ /dev/null @@ -1,27 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles').[WaitHandleDistributedSynchronizationProvider](UsS2hO+xXgwbwvK7JBT0hA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') - -## WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool) Method - -Creates a [WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') -and [maxCount](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait -handle names will be escaped/hashed. - -```csharp -public Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore CreateSemaphore(string name, int maxCount, bool exactName=false); -``` -#### Parameters - - - -`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') - - - -`maxCount` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32') - - - -`exactName` [System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean') - -#### Returns -[WaitHandleDistributedSemaphore](u++QKv1+Gje9fkJlbjceow.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') \ No newline at end of file diff --git a/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md b/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md deleted file mode 100644 index ee208a0d..00000000 --- a/docs/apiReference/u++QKv1+Gje9fkJlbjceow.md +++ /dev/null @@ -1,30 +0,0 @@ -### [Medallion.Threading.WaitHandles](0cv6wmZCIva5FK3cOR8t5g.md 'Medallion.Threading.WaitHandles') - -## WaitHandleDistributedSemaphore Class - -Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') - -```csharp -public sealed class WaitHandleDistributedSemaphore : -Medallion.Threading.IDistributedSemaphore -``` - -Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 WaitHandleDistributedSemaphore - -Implements [Medallion.Threading.IDistributedSemaphore](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore 'Medallion.Threading.IDistributedSemaphore') - -| Constructors | | -| :--- | :--- | -| [WaitHandleDistributedSemaphore(string, int, Nullable<TimeSpan>, bool)](4ysEtsHFYQ8UNvnVKspCjg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool)') | Constructs a lock with the given [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name').

[abandonmentCheckCadence](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | - -| Properties | | -| :--- | :--- | -| [MaxCount](_eKAd9KmIbGvBAAhA9RhEw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.MaxCount') | Implements [Medallion.Threading.IDistributedSemaphore.MaxCount](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.MaxCount 'Medallion.Threading.IDistributedSemaphore.MaxCount') | -| [Name](DrkUdCA1HTHqv41YDxrv5w.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Name') | Implements [Medallion.Threading.IDistributedSemaphore.Name](https://docs.microsoft.com/en-us/dotnet/api/Medallion.Threading.IDistributedSemaphore.Name 'Medallion.Threading.IDistributedSemaphore.Name') | - -| Methods | | -| :--- | :--- | -| [Acquire(Nullable<TimeSpan>, CancellationToken)](fanbWVO3U0ELSV89GyikgQ.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | -| [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](k9Mv6k_1m4DGGHNWVI0rSw.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)') | Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: | -| [TryAcquire(TimeSpan, CancellationToken)](xAXKRX1HdsJVylWBC_+WmA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket synchronously. Usage: | -| [TryAcquireAsync(TimeSpan, CancellationToken)](nk6f9CuMtAPqAG7F0UWvSA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)') | Attempts to acquire a semaphore ticket asynchronously. Usage: | From 66d059cf9e6de213712e574fa189c1f38401f39c Mon Sep 17 00:00:00 2001 From: Michael Adelson Date: Mon, 8 Aug 2022 08:25:16 -0400 Subject: [PATCH 3/3] Try Markdown.IgnoreLineBreak setting --- DistributedLockCodeGen/ApiDocGenerator.cs | 28 ++++++++++--------- ...utedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md | 16 +++++------ ...ock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md | 16 +++++------ .../Ri/nDJA.md | 16 +++++------ ....TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md | 16 +++++------ ...usyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md | 18 ++++++------ .../g.md | 18 ++++++------ .../x+hnazpWWqAWeDDlrJmTg.md | 12 ++++---- .../AzureBlobLeaseOptionsBuilder.md | 6 ++-- .../DistributedLock.Core/DeadlockException.md | 2 +- ...ions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md | 2 +- .../q+uAX8BwEjg.md | 2 +- ...s.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md | 2 +- ...AcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md | 2 +- .../DistributedLockProviderExtensions.md | 8 +++--- ....AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md | 2 +- ...ireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md | 2 +- ...AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md | 2 +- .../Vet3jdKQ.md | 2 +- ...yAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md | 2 +- ...ireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md | 2 +- ...AcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md | 2 +- ...reWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md | 2 +- ...butedReaderWriterLockProviderExtensions.md | 16 +++++------ ...AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md | 2 +- .../gXNLgnKQ.md | 2 +- .../urIfHteJZkfKKtFB7A.md | 2 +- ...reSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md | 2 +- .../DistributedSemaphoreProviderExtensions.md | 8 +++--- .../PekFHw.md | 2 +- ...bleReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md | 2 +- .../lygC7zTxR2A.md | 2 +- ...bleReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md | 2 +- ...eableReaderWriterLockProviderExtensions.md | 8 +++--- ...utedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md | 16 +++++------ ...ock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md | 16 +++++------ ...dLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md | 16 +++++------ ....TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md | 16 +++++------ .../DistributedLock.Core/IDistributedLock.md | 2 +- .../IDistributedLockProvider.md | 2 +- ....AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md | 16 +++++------ ...ireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md | 16 +++++------ ...AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md | 16 +++++------ ...reWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md | 16 +++++------ ...yAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md | 16 +++++------ .../fKwnr3rNQ.md | 16 +++++------ ...AcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md | 16 +++++------ ...reWriteLockAsync.yhTsitSwERpacPdxWmUvww.md | 16 +++++------ .../IDistributedReaderWriterLockProvider.md | 2 +- ...emaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md | 16 +++++------ .../OOOHUBoRAQHgD31Q.md | 16 +++++------ .../IDistributedSemaphore.MaxCount.md | 2 +- ...phore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md | 16 +++++------ ....TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md | 16 +++++------ .../IDistributedSemaphore.md | 4 +-- .../IDistributedSemaphoreProvider.md | 2 +- ...edSynchronizationHandle.HandleLostToken.md | 22 +++++++-------- .../IDistributedSynchronizationHandle.md | 4 +-- ...radeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md | 16 +++++------ .../LbfIJrScMNU14D5OvA.md | 16 +++++------ ...radeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md | 16 +++++------ .../1w.md | 16 +++++------ ...IDistributedUpgradeableReaderWriterLock.md | 4 +-- ...utedUpgradeableReaderWriterLockProvider.md | 2 +- .../Medallion.Threading.md | 18 ++++++------ docs/api/DistributedLock.Core/README.md | 2 ++ ...ibutedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md | 8 +++--- .../N7mTMuqXSs9QBL49fhQcQ.md | 6 ++-- ...utedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md | 16 +++++------ ...ock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md | 16 +++++------ ...dLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md | 16 +++++------ ....TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md | 16 +++++------ .../FileDistributedLock.md | 4 +-- ...KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md | 14 +++++----- ....UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md | 26 ++++++++--------- .../MySqlConnectionOptionsBuilder.md | 4 +-- ...ibutedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md | 10 +++---- ...ibutedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md | 4 +-- ...ibutedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md | 6 ++-- .../fV/58/g2xfKSkMNPcJIQ.md | 16 +++++------ ...ock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md | 16 +++++------ .../j6w.md | 16 +++++------ ....TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md | 16 +++++------ .../MySqlDistributedLock.md | 6 ++-- ...vider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md | 2 +- ...MySqlDistributedSynchronizationProvider.md | 2 +- .../Medallion.Threading.Oracle.md | 2 +- .../QhqJGH/58Hukqw.md | 10 +++---- .../7Q6X3Jg.md | 26 ++++++++--------- .../OracleConnectionOptionsBuilder.md | 4 +-- .../b645uSsJRoN1RGNqS0EQ.md | 6 ++-- .../yRSLZE0t3dA.md | 4 +-- ...utedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md | 16 +++++------ ...ock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md | 16 +++++------ ...dLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md | 16 +++++------ .../SHuju3pt92jk0aHMPqQ.md | 16 +++++------ .../OracleDistributedLock.md | 4 +-- ...WriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md | 8 +++--- ...WriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md | 10 +++---- ....AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md | 16 +++++------ .../OmDfG5O0jJHDbg.md | 16 +++++------ ...radeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md | 16 +++++------ ...bleReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md | 16 +++++------ ...AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md | 16 +++++------ ...reWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md | 16 +++++------ ...yAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md | 16 +++++------ ...ireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md | 16 +++++------ ...radeableReadLock.pCah2aRljYOlO0JIWgorWA.md | 16 +++++------ .../n2EnWZfs+furVMXeXQ.md | 16 +++++------ .../Rkv1mHYQ.md | 16 +++++------ .../h8laY2Ll0B3qHLA.md | 16 +++++------ .../OracleDistributedReaderWriterLock.md | 4 +-- .../hOrfQ/3Ylf2MDrw.md | 2 +- ...ReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md | 2 +- ...racleDistributedSynchronizationProvider.md | 6 ++-- .../Medallion.Threading.Postgres.md | 8 +++--- ...oryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md | 2 +- ...oryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md | 16 +++++------ .../uWeBQ.md | 2 +- .../PostgresAdvisoryLockKey.ToString().md | 2 +- .../PostgresAdvisoryLockKey.md | 10 +++---- ...KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md | 10 +++---- .../FdhQ+S89ng.md | 26 ++++++++--------- .../PostgresConnectionOptionsBuilder.md | 4 +-- ...ibutedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md | 2 +- ...utedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md | 16 +++++------ .../1suZB7AWMDkEWqA.md | 16 +++++------ ...dLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md | 16 +++++------ ....TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md | 16 +++++------ .../PostgresDistributedLock.md | 4 +-- ...WriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md | 2 +- ....AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md | 16 +++++------ ...ireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md | 16 +++++------ ...AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md | 16 +++++------ .../oI1g.md | 16 +++++------ .../chMVDaFHN9df7XbbnXg.md | 16 +++++------ ...ireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md | 16 +++++------ .../g.md | 16 +++++------ ...reWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md | 16 +++++------ .../PostgresDistributedReaderWriterLock.md | 4 +-- ...tgresDistributedSynchronizationProvider.md | 2 +- .../Medallion.Threading.Redis.md | 2 +- ...utedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md | 16 +++++------ .../QjYv9rC4HwcQmk9yh4x5g.md | 16 +++++------ ...dLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md | 16 +++++------ .../5kjZQ.md | 16 +++++------ .../oxr4gs+xtfk1ETgOWmw.md | 16 +++++------ ...ireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md | 16 +++++------ .../g.md | 16 +++++------ ...reWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md | 16 +++++------ .../92A.md | 16 +++++------ ...ireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md | 16 +++++------ ...AcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md | 16 +++++------ ...reWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md | 16 +++++------ ...emaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md | 16 +++++------ .../DINCj0PXg31neVA.md | 16 +++++------ ...phore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md | 16 +++++------ ....TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md | 16 +++++------ .../k+WORQrlfNeKapMJREAw.md | 18 ++++++------ ...nsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md | 12 ++++---- ...ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md | 8 +++--- ....MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md | 10 +++---- ...istributedSynchronizationOptionsBuilder.md | 8 +++--- ...onProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md | 8 +++--- ...onProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md | 2 +- ...RedisDistributedSynchronizationProvider.md | 8 +++--- .../Medallion.Threading.SqlServer.md | 6 ++-- ...KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md | 20 ++++++------- ....UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md | 26 ++++++++--------- ...r.UseTransaction.TqcdtREm34ssKiEMMEofaA.md | 10 +++---- .../SqlConnectionOptionsBuilder.md | 6 ++-- ...ibutedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md | 8 +++--- ...ibutedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md | 10 +++---- .../GL1w.md | 10 +++---- ...utedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md | 16 +++++------ .../yzFNt8CX+DvrGY7Ew.md | 16 +++++------ ...dLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md | 16 +++++------ .../hHjaF2Q.md | 16 +++++------ .../SqlDistributedLock.md | 8 +++--- .../fj2Yk0d/CnC3hDs1y3Cg.md | 10 +++---- .../D2jE25+dg.md | 10 +++---- ...WriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md | 8 +++--- .../jUeLkzFiukmQ.md | 16 +++++------ ...ireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md | 16 +++++------ ...radeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md | 16 +++++------ .../YUdo7XWAgnG1T4s0f5Vw.md | 16 +++++------ .../TaMbin4RU73eiA.md | 16 +++++------ ...reWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md | 16 +++++------ ...yAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md | 16 +++++------ ...ireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md | 16 +++++------ ...radeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md | 16 +++++------ ...bleReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md | 16 +++++------ ...AcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md | 16 +++++------ ...reWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md | 16 +++++------ .../SqlDistributedReaderWriterLock.md | 18 ++++++------ ...dSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md | 6 ++-- .../TmHEv8QIhpjqtxBSqudA.md | 6 ++-- .../ahDpIg3est068m3+NgA.md | 2 +- .../AB5PR0OVZDpw.md | 16 +++++------ .../zoZcbd0xQw.md | 16 +++++------ ...phore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md | 16 +++++------ .../rW6ewYOdNw.md | 16 +++++------ .../SqlDistributedSemaphore.md | 6 ++-- .../tAHXb7DSNADefkuRKg.md | 2 +- .../sU0nmoSgVAlSEihYgHv9Q.md | 2 +- .../SqlDistributedSynchronizationProvider.md | 8 +++--- ...ibutedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md | 10 +++---- ...utedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md | 16 +++++------ .../XRVgkI/77ehHSwgz3+6g.md | 16 +++++------ ...dLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md | 16 +++++------ .../IL0puVDTMR7U2w.md | 16 +++++------ .../EventWaitHandleDistributedLock.md | 2 +- .../Medallion.Threading.WaitHandles.md | 2 +- ...dSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md | 10 +++---- ...emaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md | 16 +++++------ .../1m4DGGHNWVI0rSw.md | 16 +++++------ .../+WmA.md | 16 +++++------ ....TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md | 16 +++++------ .../WaitHandleDistributedSemaphore.md | 2 +- .../NJBO/BPj27n2I4gbA.md | 2 +- ....CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md | 4 +-- ...andleDistributedSynchronizationProvider.md | 6 ++-- .../Medallion.Threading.ZooKeeper.md | 6 ++-- .../JnVaogxN4UVbbBww.md | 6 ++-- .../J7K06jJzbPO75s7Pg.md | 6 ++-- .../TLwd8GsE6eSegfTOg.md | 6 ++-- ...ock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md | 16 +++++------ ...dallion.Threading.IDistributedLock.Name.md | 2 +- .../Osz5FH2DXIg.md | 16 +++++------ .../ZooKeeperDistributedLock.md | 10 +++---- ...WriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md | 6 ++-- ...WriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md | 6 ++-- .../wQ.md | 6 ++-- ...ireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md | 16 +++++------ ...reWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md | 16 +++++------ ...ading.IDistributedReaderWriterLock.Name.md | 2 +- ...ireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md | 16 +++++------ ...reWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md | 16 +++++------ .../ZooKeeperDistributedReaderWriterLock.md | 8 +++--- ...dSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md | 6 ++-- ...dSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md | 6 ++-- .../TgjjnsQT9A.md | 6 ++-- ...ore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md | 16 +++++------ ...on.Threading.IDistributedSemaphore.Name.md | 2 +- ....TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md | 16 +++++------ .../ZooKeeperDistributedSemaphore.md | 8 +++--- ...AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md | 6 ++-- ...lder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md | 8 +++--- .../ihabf4bAq6D8+832gAKA.md | 4 +-- ...r.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md | 8 +++--- ...istributedSynchronizationOptionsBuilder.md | 8 +++--- ...onProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md | 2 +- ...onProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md | 2 +- ...eeperDistributedSynchronizationProvider.md | 8 +++--- .../ZooKeeperPath.md | 2 +- 255 files changed, 1368 insertions(+), 1364 deletions(-) diff --git a/DistributedLockCodeGen/ApiDocGenerator.cs b/DistributedLockCodeGen/ApiDocGenerator.cs index 61732c0e..10419fc5 100644 --- a/DistributedLockCodeGen/ApiDocGenerator.cs +++ b/DistributedLockCodeGen/ApiDocGenerator.cs @@ -71,26 +71,28 @@ async Task GenerateApiDocsAsync(string projectDirectory) { var projectName = Path.GetFileName(projectDirectory); var binDirectory = Path.Combine(projectDirectory, "bin", "Release", DocsFramework); + var outputDirectoryPath = Path.Combine(contentPath, projectName); - var config = new + var config = new Dictionary { - AssemblyFilePath = Path.Combine(binDirectory, projectName + ".dll"), - DocumentationFilePath = Path.Combine(binDirectory, projectName + ".xml"), - ProjectDirectoryPath = projectDirectory, - OutputDirectoryPath = Path.Combine(contentPath, projectName), - AssemblyPageName = "README", - GeneratedAccessModifiers = "Public,Protected,ProtectedInternal", - GeneratedPages = "Assembly,Namespaces,Types,Members", - LinksOutputFilePath = Path.Combine(linksPath, projectName + ".txt"), - LinksBaseUrl = $"https://github.com/madelson/DistributedLock/tree/default-documentation/{DocsFolder}/{ApiFolder}/{projectName}/", - ExternLinksFilePaths = new string[] { Path.Combine(linksPath, "*.txt") }, - FileNameFactory = "NameAndMd5Mix", + { "AssemblyFilePath", Path.Combine(binDirectory, projectName + ".dll") }, + { "DocumentationFilePath", Path.Combine(binDirectory, projectName + ".xml") }, + { "ProjectDirectoryPath", projectDirectory }, + { "OutputDirectoryPath", outputDirectoryPath }, + { "AssemblyPageName", "README" }, + { "GeneratedAccessModifiers", "Public,Protected,ProtectedInternal" }, + { "GeneratedPages", "Assembly,Namespaces,Types,Members" }, + { "LinksOutputFilePath", Path.Combine(linksPath, projectName + ".txt") }, + { "LinksBaseUrl", $"https://github.com/madelson/DistributedLock/tree/default-documentation/{DocsFolder}/{ApiFolder}/{projectName}/" }, + { "ExternLinksFilePaths", new string[] { Path.Combine(linksPath, "*.txt") } }, + { "FileNameFactory", "NameAndMd5Mix" }, + { "Markdown.IgnoreLineBreak", true }, }; var configFilePath = Path.Combine(tempDirectory, projectName + "_config.json"); File.WriteAllText(configFilePath, JsonSerializer.Serialize(config)); - DeleteDirectoryIfExists(config.OutputDirectoryPath); + DeleteDirectoryIfExists(outputDirectoryPath); await Shell.Run("defaultdocumentation", "-j", configFilePath).Task; } } diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md index e8eb6c7c..09dd930a 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.Acquire.jrwmxrsi+eqzAdB3xMnaMw.md @@ -3,14 +3,14 @@ ## AzureBlobLeaseDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md index 16e5ba53..3b8bc5e6 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.AcquireAsync.ulCFSvmk3VUn6f5ebzKW9A.md @@ -3,14 +3,14 @@ ## AzureBlobLeaseDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md index 5d82d03c..a9e82b02 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquire.1mh2rZwMkBLLsl/Ri/nDJA.md @@ -3,14 +3,14 @@ ## AzureBlobLeaseDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md index f7568516..83d5fd08 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseDistributedLock.TryAcquireAsync.h3ZvrsNxi9ZoUPGAFzUdCQ.md @@ -3,14 +3,14 @@ ## AzureBlobLeaseDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md index f6ad04a3..b04ceb28 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md @@ -3,15 +3,15 @@ ## AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime(TimeSpan, TimeSpan) Method -Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps. -This determines how much time is spent sleeping between attempts. Lower values will raise the -volume of acquire requests under contention but will also raise the responsiveness (how long -it takes a waiter to notice that a contended the lease has become available). - -Specifying a range of values allows the implementation to select an actual value in the range -at random for each sleep. This helps avoid the case where two clients become "synchronized" -in such a way that results in one client monopolizing the lease. - +Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps. +This determines how much time is spent sleeping between attempts. Lower values will raise the +volume of acquire requests under contention but will also raise the responsiveness (how long +it takes a waiter to notice that a contended the lease has become available). + +Specifying a range of values allows the implementation to select an actual value in the range +at random for each sleep. This helps avoid the case where two clients become "synchronized" +in such a way that results in one client monopolizing the lease. + The default is [250ms, 1s] ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md index 8a3b3560..f2ebc9f5 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md @@ -3,15 +3,15 @@ ## AzureBlobLeaseOptionsBuilder.Duration(TimeSpan) Method -Specifies how long the lease will last, absent auto-renewal. - -If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests, -while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to -exit without explicitly releasing, then duration determines how long other processes would need to wait in -order to acquire the lease. - -If auto-renewal is disabled, then duration determines how long the lease will be held. - +Specifies how long the lease will last, absent auto-renewal. + +If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests, +while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to +exit without explicitly releasing, then duration determines how long other processes would need to wait in +order to acquire the lease. + +If auto-renewal is disabled, then duration determines how long the lease will be held. + Defaults to 30s. ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md index 11349a84..41f034da 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.RenewalCadence/x+hnazpWWqAWeDDlrJmTg.md @@ -3,12 +3,12 @@ ## AzureBlobLeaseOptionsBuilder.RenewalCadence(TimeSpan) Method -Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests -but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in -before the lease duration expires. - -To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') - +Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests +but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in +before the lease duration expires. + +To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') + Defaults to 1/3 of the specified lease duration (may be infinite). ```csharp diff --git a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md index 780b51d1..53623610 100644 --- a/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md +++ b/docs/api/DistributedLock.Azure/AzureBlobLeaseOptionsBuilder.md @@ -13,6 +13,6 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [BusyWaitSleepTime(TimeSpan, TimeSpan)](AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps.
This determines how much time is spent sleeping between attempts. Lower values will raise the
volume of acquire requests under contention but will also raise the responsiveness (how long
it takes a waiter to notice that a contended the lease has become available).

Specifying a range of values allows the implementation to select an actual value in the range
at random for each sleep. This helps avoid the case where two clients become "synchronized"
in such a way that results in one client monopolizing the lease.

The default is [250ms, 1s] | -| [Duration(TimeSpan)](AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.Duration(System.TimeSpan)') | Specifies how long the lease will last, absent auto-renewal.

If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests,
while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to
exit without explicitly releasing, then duration determines how long other processes would need to wait in
order to acquire the lease.

If auto-renewal is disabled, then duration determines how long the lease will be held.

Defaults to 30s. | -| [RenewalCadence(TimeSpan)](AzureBlobLeaseOptionsBuilder.RenewalCadence./x+hnazpWWqAWeDDlrJmTg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.RenewalCadence(System.TimeSpan)') | Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests
but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in
before the lease duration expires.

To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')

Defaults to 1/3 of the specified lease duration (may be infinite). | +| [BusyWaitSleepTime(TimeSpan, TimeSpan)](AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime.mMUlB7vk6GdAQl9sAcmgNg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lease requires a busy wait that alternates acquire attempts and sleeps. This determines how much time is spent sleeping between attempts. Lower values will raise the volume of acquire requests under contention but will also raise the responsiveness (how long it takes a waiter to notice that a contended the lease has become available). Specifying a range of values allows the implementation to select an actual value in the range at random for each sleep. This helps avoid the case where two clients become "synchronized" in such a way that results in one client monopolizing the lease. The default is [250ms, 1s] | +| [Duration(TimeSpan)](AzureBlobLeaseOptionsBuilder.Duration.QEP6QPTxOgzkkg0h39jM/g.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.Duration(System.TimeSpan)') | Specifies how long the lease will last, absent auto-renewal. If auto-renewal is enabled (the default), then a shorter duration means more frequent auto-renewal requests, while an infinite duration means no auto-renewal requests. Furthermore, if the lease-holding process were to exit without explicitly releasing, then duration determines how long other processes would need to wait in order to acquire the lease. If auto-renewal is disabled, then duration determines how long the lease will be held. Defaults to 30s. | +| [RenewalCadence(TimeSpan)](AzureBlobLeaseOptionsBuilder.RenewalCadence./x+hnazpWWqAWeDDlrJmTg.md 'Medallion.Threading.Azure.AzureBlobLeaseOptionsBuilder.RenewalCadence(System.TimeSpan)') | Determines how frequently the lease will be renewed when held. More frequent renewal means more unnecessary requests but also a lower chance of losing the lease due to the process hanging or otherwise failing to get its renewal request in before the lease duration expires. To disable auto-renewal, specify [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') Defaults to 1/3 of the specified lease duration (may be infinite). | diff --git a/docs/api/DistributedLock.Core/DeadlockException.md b/docs/api/DistributedLock.Core/DeadlockException.md index ac26e7ec..8b847a8b 100644 --- a/docs/api/DistributedLock.Core/DeadlockException.md +++ b/docs/api/DistributedLock.Core/DeadlockException.md @@ -3,7 +3,7 @@ ## DeadlockException Class -An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks +An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks that throw this exception under some circumstances cannot detect ALL deadlock conditions ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md index eb3e6afd..08b7a3e6 100644 --- a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md @@ -3,7 +3,7 @@ ## DistributedLockProviderExtensions.AcquireLock(this IDistributedLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md index ca816530..bc8c4af5 100644 --- a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md @@ -3,7 +3,7 @@ ## DistributedLockProviderExtensions.AcquireLockAsync(this IDistributedLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md index aa88027a..9821f0dd 100644 --- a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md @@ -3,7 +3,7 @@ ## DistributedLockProviderExtensions.TryAcquireLock(this IDistributedLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md index 3363f0f4..4c0f06bf 100644 --- a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md @@ -3,7 +3,7 @@ ## DistributedLockProviderExtensions.TryAcquireLockAsync(this IDistributedLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then +Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md index 8f6c7e55..068d9e7f 100644 --- a/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md +++ b/docs/api/DistributedLock.Core/DistributedLockProviderExtensions.md @@ -13,7 +13,7 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [AcquireLock(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireLockAsync(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | -| [TryAcquireLock(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireLockAsync(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then
[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [AcquireLock(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLock.DMP8nUt70Bor8mi0Krb42A.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md 'Medallion.Threading.IDistributedLock.Acquire(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireLockAsync(this IDistributedLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedLockProviderExtensions.AcquireLockAsync.+REikXPbHJ/q+uAX8BwEjg.md 'Medallion.Threading.DistributedLockProviderExtensions.AcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md 'Medallion.Threading.IDistributedLock.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireLock(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLock.1sWD0pz+gM4NV17JJV3RTw.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLock(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [TryAcquire(TimeSpan, CancellationToken)](IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireLockAsync(this IDistributedLockProvider, string, TimeSpan, CancellationToken)](DistributedLockProviderExtensions.TryAcquireLockAsync.eBA2EKzaS4eJOnnXosupQg.md 'Medallion.Threading.DistributedLockProviderExtensions.TryAcquireLockAsync(this Medallion.Threading.IDistributedLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateLock(string)](IDistributedLockProvider.CreateLock.lcl3dolUp9eZyeUENeHU9w.md 'Medallion.Threading.IDistributedLockProvider.CreateLock(string)') and then [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md 'Medallion.Threading.IDistributedLock.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md index 63b82304..78230970 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.AcquireReadLock(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md index 369b0626..16eb057e 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md index 1a64d81d..cc5e86e4 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.AcquireWriteLock(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md index 074b5234..40b19d56 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md index 71de5a88..287c4518 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md index fd01bf83..aa6b71a7 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md index 7be2d08a..11e8d150 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md index 17ba428b..5e98cd2e 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md @@ -3,7 +3,7 @@ ## DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then +Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md index e6b3568a..950422a2 100644 --- a/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md +++ b/docs/api/DistributedLock.Core/DistributedReaderWriterLockProviderExtensions.md @@ -13,11 +13,11 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [AcquireReadLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireWriteLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)'). | -| [TryAcquireReadLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireWriteLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then
[TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [AcquireReadLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLock.ZhZPMV6nWYpiDzXAN3gDOQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync.btqzvB7WyYZWa9xgYACZmA.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireWriteLock(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLock.KIDCaBOI+d5buraGWrnHpg.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync.HT7LKAp7tqVtM/Vet3jdKQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.AcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [AcquireWriteLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md 'Medallion.Threading.IDistributedReaderWriterLock.AcquireWriteLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireReadLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock.vOCz3Wz2jkDdUYGywzVM8Q.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireReadLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireReadLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync.A1jgGtvBfzba5znceHCWSQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireReadLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireReadLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireWriteLock(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock.JkEs48Kec6mXgXRDEw9ElQ.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLock(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireWriteLock(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireWriteLockAsync(this IDistributedReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync.tsNArNTtLZ78uW3mRNiz0w.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions.TryAcquireWriteLockAsync(this Medallion.Threading.IDistributedReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateReaderWriterLock(string)](IDistributedReaderWriterLockProvider.CreateReaderWriterLock.BJyxJJllIyIqdlfqBHLDTA.md 'Medallion.Threading.IDistributedReaderWriterLockProvider.CreateReaderWriterLock(string)') and then [TryAcquireWriteLockAsync(TimeSpan, CancellationToken)](IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md 'Medallion.Threading.IDistributedReaderWriterLock.TryAcquireWriteLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md index ccfa92ae..81ab188d 100644 --- a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md @@ -3,7 +3,7 @@ ## DistributedSemaphoreProviderExtensions.AcquireSemaphore(this IDistributedSemaphoreProvider, string, int, Nullable, CancellationToken) Method -Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md index 9ec884ee..40d60b40 100644 --- a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md @@ -3,7 +3,7 @@ ## DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, Nullable, CancellationToken) Method -Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md index d0cdb210..788b148c 100644 --- a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md @@ -3,7 +3,7 @@ ## DistributedSemaphoreProviderExtensions.TryAcquireSemaphore(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md index 91578902..f3539dc9 100644 --- a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md @@ -3,7 +3,7 @@ ## DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then +Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md index e8d56d73..1bb2535f 100644 --- a/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md +++ b/docs/api/DistributedLock.Core/DistributedSemaphoreProviderExtensions.md @@ -13,7 +13,7 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [AcquireSemaphore(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | -| [TryAcquireSemaphore(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then
[TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [AcquireSemaphore(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphore.XSSUj7gKekS+ySxX0Ib0hA.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [Acquire(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md 'Medallion.Threading.IDistributedSemaphore.Acquire(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, Nullable<TimeSpan>, CancellationToken)](DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync.lqwIyu+bS538c/gXNLgnKQ.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.AcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [AcquireAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md 'Medallion.Threading.IDistributedSemaphore.AcquireAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireSemaphore(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphore.Onb/urIfHteJZkfKKtFB7A.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphore(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [TryAcquire(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md 'Medallion.Threading.IDistributedSemaphore.TryAcquire(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireSemaphoreAsync(this IDistributedSemaphoreProvider, string, int, TimeSpan, CancellationToken)](DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync.4x4cCEwsrDjb1URUsaVDyg.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions.TryAcquireSemaphoreAsync(this Medallion.Threading.IDistributedSemaphoreProvider, string, int, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateSemaphore(string, int)](IDistributedSemaphoreProvider.CreateSemaphore.AA9FahTKczyqDQd0GIAGzQ.md 'Medallion.Threading.IDistributedSemaphoreProvider.CreateSemaphore(string, int)') and then [TryAcquireAsync(TimeSpan, CancellationToken)](IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md 'Medallion.Threading.IDistributedSemaphore.TryAcquireAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md index c052805a..cfffb1b0 100644 --- a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md @@ -3,7 +3,7 @@ ## DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md index c73da700..861eb551 100644 --- a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md @@ -3,7 +3,7 @@ ## DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable, CancellationToken) Method -Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md index fb45358d..67197ed3 100644 --- a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md @@ -3,7 +3,7 @@ ## DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md index a47ebbf1..f9852907 100644 --- a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md @@ -3,7 +3,7 @@ ## DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken) Method -Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then +Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). ```csharp diff --git a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md index 52a9bdff..fceed19a 100644 --- a/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md +++ b/docs/api/DistributedLock.Core/DistributedUpgradeableReaderWriterLockProviderExtensions.md @@ -13,7 +13,7 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [AcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'). | -| [AcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | -| [TryAcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | -| [TryAcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then
[TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | +| [AcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock.LhlQ1GjOVkQgN5H/PekFHw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'). | +| [AcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, Nullable<TimeSpan>, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync.ESXR5pVbQ3ZCoCNayGDOPQ.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.AcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.Nullable, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [AcquireUpgradeableReadLockAsync(Nullable<TimeSpan>, CancellationToken)](IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(System.Nullable, System.Threading.CancellationToken)'). | +| [TryAcquireUpgradeableReadLock(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock.5Zr97IQvZb/lygC7zTxR2A.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLock(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(System.TimeSpan, System.Threading.CancellationToken)'). | +| [TryAcquireUpgradeableReadLockAsync(this IDistributedUpgradeableReaderWriterLockProvider, string, TimeSpan, CancellationToken)](DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync.xlsczpQ3Zsbfz74nI0lnPw.md 'Medallion.Threading.DistributedUpgradeableReaderWriterLockProviderExtensions.TryAcquireUpgradeableReadLockAsync(this Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider, string, System.TimeSpan, System.Threading.CancellationToken)') | Equivalent to calling [CreateUpgradeableReaderWriterLock(string)](IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock.CLmVtTtcnh6LtTDHkHXXtQ.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider.CreateUpgradeableReaderWriterLock(string)') and then [TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken)](IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(System.TimeSpan, System.Threading.CancellationToken)'). | diff --git a/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md b/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md index 427b82de..a1470380 100644 --- a/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md +++ b/docs/api/DistributedLock.Core/IDistributedLock.Acquire.Q+8FXimBZqUrDv5tTRw59w.md @@ -3,14 +3,14 @@ ## IDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md b/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md index 68334701..f6381ffe 100644 --- a/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md +++ b/docs/api/DistributedLock.Core/IDistributedLock.AcquireAsync.0Lol7Hv58Kl+UVYSOI6IpQ.md @@ -3,14 +3,14 @@ ## IDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md index 3b3b567b..4d93c450 100644 --- a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md +++ b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md @@ -3,14 +3,14 @@ ## IDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md index b0048bc5..442329e2 100644 --- a/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md +++ b/docs/api/DistributedLock.Core/IDistributedLock.TryAcquireAsync.ZLhweq3GadK5OwGmTwruEQ.md @@ -3,14 +3,14 @@ ## IDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedLock.md b/docs/api/DistributedLock.Core/IDistributedLock.md index 1424eeb0..b9dd3c83 100644 --- a/docs/api/DistributedLock.Core/IDistributedLock.md +++ b/docs/api/DistributedLock.Core/IDistributedLock.md @@ -3,7 +3,7 @@ ## IDistributedLock Interface -A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code +A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code across processes or systems. The scope and capabilities of the lock are dependent on the particular implementation ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedLockProvider.md b/docs/api/DistributedLock.Core/IDistributedLockProvider.md index ea4311fc..8445e712 100644 --- a/docs/api/DistributedLock.Core/IDistributedLockProvider.md +++ b/docs/api/DistributedLock.Core/IDistributedLockProvider.md @@ -3,7 +3,7 @@ ## IDistributedLockProvider Interface -Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be +Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be easier to use than [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') in dependency injection scenarios. ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md index ac86e387..b67a8b91 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLock.bAhgltfPpI+hi4bNotiyGg.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method -Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (myLock.AcquireReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md index 0af1e98a..2f2f1c75 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireReadLockAsync.otuQSEhQpAEqEEBnyFJHtw.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md index 8e4e9137..1907646f 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLock.8zDirrYDrgr0WzrsnH7blA.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method -Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (myLock.AcquireWriteLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md index cf7505e0..22c33010 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.AcquireWriteLockAsync.fFyCc0HswQXUnGvjzNHJ+A.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md index 1b40ca85..796e5819 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLock.FwhFBAUmx9brWLKd6O1SSw.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md index f55c73e4..7eeaff05 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireReadLockAsync.1wx2S+CeVe62/fKwnr3rNQ.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md index a770d330..983dae31 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLock.ypAYPzEP3B1U6LcOEQzWBw.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireWriteLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md index b4016416..72c3eca9 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.TryAcquireWriteLockAsync.yhTsitSwERpacPdxWmUvww.md @@ -3,14 +3,14 @@ ## IDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md index 013efa09..53a2da6a 100644 --- a/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md +++ b/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md @@ -3,7 +3,7 @@ ## IDistributedReaderWriterLockProvider Interface -Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be +Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be easier to use than [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') in dependency injection scenarios. ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md index 99790d60..cb376189 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.Acquire.Idy1BAzgGUWQ22QmqRZDsg.md @@ -3,14 +3,14 @@ ## IDistributedSemaphore.Acquire(Nullable, CancellationToken) Method -Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (mySemaphore.Acquire(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md index 4e3d53ad..0a84368c 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.AcquireAsync.72hbd/OOOHUBoRAQHgD31Q.md @@ -3,14 +3,14 @@ ## IDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method -Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await mySemaphore.AcquireAsync(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md index de86f37e..52a0c243 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.MaxCount.md @@ -3,7 +3,7 @@ ## IDistributedSemaphore.MaxCount Property -The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire +The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire the semaphore concurrently). ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md index b6d52a2c..6c27ed12 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquire.G9QqgKI96XBtpNQoUp0RZg.md @@ -3,14 +3,14 @@ ## IDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket synchronously. Usage: - -```csharp -using (var handle = mySemaphore.TryAcquire(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md index 252d7d28..89da1802 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.TryAcquireAsync.yTpJMeiQTyO40ByV0nmdkQ.md @@ -3,14 +3,14 @@ ## IDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket asynchronously. Usage: - -```csharp -await using (var handle = await mySemaphore.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphore.md b/docs/api/DistributedLock.Core/IDistributedSemaphore.md index cd157678..9d1934a5 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphore.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphore.md @@ -3,7 +3,7 @@ ## IDistributedSemaphore Interface -A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes. +A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes. Compare to [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore'). ```csharp @@ -12,7 +12,7 @@ public interface IDistributedSemaphore | Properties | | | :--- | :--- | -| [MaxCount](IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire
the semaphore concurrently). | +| [MaxCount](IDistributedSemaphore.MaxCount.md 'Medallion.Threading.IDistributedSemaphore.MaxCount') | The maximum number of "tickets" available for the semaphore (ie the number of processes which can acquire the semaphore concurrently). | | [Name](IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name') | A name that uniquely identifies the semaphore | | Methods | | diff --git a/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md index 562a69db..c70aeeee 100644 --- a/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md +++ b/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md @@ -3,7 +3,7 @@ ## IDistributedSemaphoreProvider Interface -Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be +Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be easier to use than [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') in dependency injection scenarios. ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md index 2a95b95d..b3d94fce 100644 --- a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md +++ b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.HandleLostToken.md @@ -3,17 +3,17 @@ ## IDistributedSynchronizationHandle.HandleLostToken Property -Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to -monitor whether the handle to the lock is lost before the handle is -disposed. - -For example, this could happen if the lock is backed by a -database and the connection to the database is disrupted. - -Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None') -which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled'). - -For lock types that do support this, accessing this property may incur additional +Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to +monitor whether the handle to the lock is lost before the handle is +disposed. + +For example, this could happen if the lock is backed by a +database and the connection to the database is disrupted. + +Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None') +which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled'). + +For lock types that do support this, accessing this property may incur additional costs, such as polling to detect connectivity loss. ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md index e3c49a24..953923e2 100644 --- a/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md +++ b/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md @@ -3,7 +3,7 @@ ## IDistributedSynchronizationHandle Interface -A handle to a distributed lock or other synchronization primitive. To unlock/release, +A handle to a distributed lock or other synchronization primitive. To unlock/release, simply dispose the handle. ```csharp @@ -19,4 +19,4 @@ Implements [System.IDisposable](https://docs.microsoft.com/en-us/dotnet/api/Syst | Properties | | | :--- | :--- | -| [HandleLostToken](IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to
monitor whether the handle to the lock is lost before the handle is
disposed.

For example, this could happen if the lock is backed by a
database and the connection to the database is disrupted.

Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None')
which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled').

For lock types that do support this, accessing this property may incur additional
costs, such as polling to detect connectivity loss. | +| [HandleLostToken](IDistributedSynchronizationHandle.HandleLostToken.md 'Medallion.Threading.IDistributedSynchronizationHandle.HandleLostToken') | Gets a [System.Threading.CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken 'System.Threading.CancellationToken') instance which may be used to monitor whether the handle to the lock is lost before the handle is disposed. For example, this could happen if the lock is backed by a database and the connection to the database is disrupted. Not all lock types support this; those that don't will return [System.Threading.CancellationToken.None](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.None 'System.Threading.CancellationToken.None') which can be detected by checking [System.Threading.CancellationToken.CanBeCanceled](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.CancellationToken.CanBeCanceled 'System.Threading.CancellationToken.CanBeCanceled'). For lock types that do support this, accessing this property may incur additional costs, such as polling to detect connectivity loss. | diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md index 3b87d44e..864e1194 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock.MgsbqNeNv0qen0RVQV8MHA.md @@ -3,14 +3,14 @@ ## IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method -Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (myLock.AcquireUpgradeableReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md index f77b660b..e001e754 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync.XDD/LbfIJrScMNU14D5OvA.md @@ -3,14 +3,14 @@ ## IDistributedUpgradeableReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method -Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireUpgradeableReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md index 84b107cc..28659989 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock.NcomTiK4v4VsrD5p8zrY6A.md @@ -3,14 +3,14 @@ ## IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md index e342a84a..1793a755 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync.NeQQ4jMkCO0IteXQSJv/1w.md @@ -3,14 +3,14 @@ ## IDistributedUpgradeableReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md index 40d970de..b62695d4 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLock.md @@ -3,8 +3,8 @@ ## IDistributedUpgradeableReaderWriterLock Interface -Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock -allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write +Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock +allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write lock without releasing the underlying handle. ```csharp diff --git a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md index 964c9678..7ac98370 100644 --- a/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md +++ b/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md @@ -3,7 +3,7 @@ ## IDistributedUpgradeableReaderWriterLockProvider Interface -Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be +Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be easier to use than [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') in dependency injection scenarios. ```csharp diff --git a/docs/api/DistributedLock.Core/Medallion.Threading.md b/docs/api/DistributedLock.Core/Medallion.Threading.md index 41e4ce03..fd812818 100644 --- a/docs/api/DistributedLock.Core/Medallion.Threading.md +++ b/docs/api/DistributedLock.Core/Medallion.Threading.md @@ -4,7 +4,7 @@ | Classes | | | :--- | :--- | -| [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') | An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks
that throw this exception under some circumstances cannot detect ALL deadlock conditions | +| [DeadlockException](DeadlockException.md 'Medallion.Threading.DeadlockException') | An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks that throw this exception under some circumstances cannot detect ALL deadlock conditions | | [DistributedLockProviderExtensions](DistributedLockProviderExtensions.md 'Medallion.Threading.DistributedLockProviderExtensions') | Productivity helper methods for [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') | | [DistributedReaderWriterLockProviderExtensions](DistributedReaderWriterLockProviderExtensions.md 'Medallion.Threading.DistributedReaderWriterLockProviderExtensions') | Productivity helper methods for [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') | | [DistributedSemaphoreProviderExtensions](DistributedSemaphoreProviderExtensions.md 'Medallion.Threading.DistributedSemaphoreProviderExtensions') | Productivity helper methods for [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') | @@ -12,13 +12,13 @@ | Interfaces | | | :--- | :--- | -| [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') | A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code
across processes or systems. The scope and capabilities of the lock are dependent on the particular implementation | -| [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') | Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be
easier to use than [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') in dependency injection scenarios. | +| [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') | A mutex synchronization primitive which can be used to coordinate access to a resource or critical region of code across processes or systems. The scope and capabilities of the lock are dependent on the particular implementation | +| [IDistributedLockProvider](IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') | Acts as a factory for [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') instances of a certain type. This interface may be easier to use than [IDistributedLock](IDistributedLock.md 'Medallion.Threading.IDistributedLock') in dependency injection scenarios. | | [IDistributedLockUpgradeableHandle](IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | A [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') that can be upgraded to a write lock | | [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') | Provides distributed locking functionality comparable to [System.Threading.ReaderWriterLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLock 'System.Threading.ReaderWriterLock') | -| [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') | Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be
easier to use than [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') in dependency injection scenarios. | -| [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') | A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes.
Compare to [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore'). | -| [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') | Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be
easier to use than [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') in dependency injection scenarios. | -| [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | A handle to a distributed lock or other synchronization primitive. To unlock/release,
simply dispose the handle. | -| [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') | Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock
allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write
lock without releasing the underlying handle. | -| [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') | Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be
easier to use than [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') in dependency injection scenarios. | +| [IDistributedReaderWriterLockProvider](IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') | Acts as a factory for [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') instances of a certain type. This interface may be easier to use than [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') in dependency injection scenarios. | +| [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') | A synchronization primitive which restricts access to a resource or critical section of code to a fixed number of concurrent threads/processes. Compare to [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore'). | +| [IDistributedSemaphoreProvider](IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') | Acts as a factory for [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') instances of a certain type. This interface may be easier to use than [IDistributedSemaphore](IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') in dependency injection scenarios. | +| [IDistributedSynchronizationHandle](IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | A handle to a distributed lock or other synchronization primitive. To unlock/release, simply dispose the handle. | +| [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') | Extends [IDistributedReaderWriterLock](IDistributedReaderWriterLock.md 'Medallion.Threading.IDistributedReaderWriterLock') with the ability to take an "upgrade" lock. Like a read lock, an upgrade lock allows for other concurrent read locks, but not for other upgrade or write locks. However, an upgrade lock can also be upgraded to a write lock without releasing the underlying handle. | +| [IDistributedUpgradeableReaderWriterLockProvider](IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') | Acts as a factory for [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') instances of a certain type. This interface may be easier to use than [IDistributedUpgradeableReaderWriterLock](IDistributedUpgradeableReaderWriterLock.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLock') in dependency injection scenarios. | diff --git a/docs/api/DistributedLock.Core/README.md b/docs/api/DistributedLock.Core/README.md index 416419f7..21c48135 100644 --- a/docs/api/DistributedLock.Core/README.md +++ b/docs/api/DistributedLock.Core/README.md @@ -2,6 +2,8 @@ ## DistributedLock.Core Assembly +DistributedLock.Core is such a cool library! + | Namespaces | | | :--- | :--- | | [Medallion.Threading](Medallion.Threading.md 'Medallion.Threading') | | diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md index 43c48fa3..1fa23f63 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md @@ -3,10 +3,10 @@ ## FileDistributedLock(DirectoryInfo, string) Constructor -Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name -will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced. - -Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file +Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name +will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced. + +Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file will similarly be created if it does not already exist, and will be deleted when the lock is released. ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md index b6505561..5c5c249d 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock..ctor/N7mTMuqXSs9QBL49fhQcQ.md @@ -3,9 +3,9 @@ ## FileDistributedLock(FileInfo) Constructor -Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name. - -Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file +Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name. + +Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file will similarly be created if it does not already exist, and will be deleted when the lock is released. ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md index 1225c270..97e7755d 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.Acquire.Cxe4kn5Dotos0VNT8S7mFg.md @@ -3,14 +3,14 @@ ## FileDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md index 687f15f2..c8b8f844 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.AcquireAsync.S5lCsEuKHmzK+f7lUXq+aw.md @@ -3,14 +3,14 @@ ## FileDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md index 595ee888..3b9eac62 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquire.zN8fZOiOkhzpcu5NxeJk8g.md @@ -3,14 +3,14 @@ ## FileDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md index 18b74f10..5e850fbd 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.TryAcquireAsync.VuLjCVM0f9HO9kvR8wPWxQ.md @@ -3,14 +3,14 @@ ## FileDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.FileSystem/FileDistributedLock.md b/docs/api/DistributedLock.FileSystem/FileDistributedLock.md index 4c795760..26129dc4 100644 --- a/docs/api/DistributedLock.FileSystem/FileDistributedLock.md +++ b/docs/api/DistributedLock.FileSystem/FileDistributedLock.md @@ -16,8 +16,8 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [FileDistributedLock(DirectoryInfo, string)](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string)') | Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name
will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced.

Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file
will similarly be created if it does not already exist, and will be deleted when the lock is released. | -| [FileDistributedLock(FileInfo)](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo)') | Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name.

Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file
will similarly be created if it does not already exist, and will be deleted when the lock is released. | +| [FileDistributedLock(DirectoryInfo, string)](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string)') | Constructs a lock which will place a lock file in [lockFileDirectory](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).lockFileDirectory 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).lockFileDirectory'). The file's name will be based on [name](FileDistributedLock..ctor.vNzzxMsPVMiUjD+hEvX7EQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo,string).name 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.DirectoryInfo, string).name'), but with proper escaping/hashing to ensure that a valid file name is produced. Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file will similarly be created if it does not already exist, and will be deleted when the lock is released. | +| [FileDistributedLock(FileInfo)](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo)') | Constructs a lock which uses the provided [lockFile](FileDistributedLock..ctor./N7mTMuqXSs9QBL49fhQcQ.md#Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile 'Medallion.Threading.FileSystem.FileDistributedLock.FileDistributedLock(System.IO.FileInfo).lockFile') as the exact file name. Upon acquiring the lock, the file's directory will be created automatically if it does not already exist. The file will similarly be created if it does not already exist, and will be deleted when the lock is released. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md index d721da0f..bf8369b1 100644 --- a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md @@ -3,13 +3,13 @@ ## MySqlConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method -MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it. -For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout. - -To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. - -Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours. - +MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it. +For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. + +Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours. + Setting a value of [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') disables keepalive. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md index 274d353d..0ad5d4f2 100644 --- a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md @@ -3,19 +3,19 @@ ## MySqlConnectionOptionsBuilder.UseMultiplexing(bool) Method -This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) -a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is -often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. - -Multiplexing is on by default. - -This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an -Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing -strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) -connection will be allocated. - -This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also -particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md index 2c503b8d..2e6f07d7 100644 --- a/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md +++ b/docs/api/DistributedLock.MySql/MySqlConnectionOptionsBuilder.md @@ -13,5 +13,5 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [KeepaliveCadence(TimeSpan)](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it.
For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.

Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours.

Setting a value of [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') disables keepalive. | -| [UseMultiplexing(bool)](MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | +| [KeepaliveCadence(TimeSpan)](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | MySQL's wait_timeout system variable determines how long the server will allow a connection to be idle before killing it. For more information, see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout. To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. Because MySQL's default for this setting is 8 hours, the default [keepaliveCadence](MySqlConnectionOptionsBuilder.KeepaliveCadence.UQXLJo99rQgbid2s4ZOgRQ.md#Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan).keepaliveCadence') is 3.5 hours. Setting a value of [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan') disables keepalive. | +| [UseMultiplexing(bool)](MySqlConnectionOptionsBuilder.UseMultiplexing.fKIzw1BfXbV8NLqGfoikqw.md 'Medallion.Threading.MySql.MySqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. Multiplexing is on by default. This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) connection will be allocated. This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md index 7f5c3900..96ee2f36 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md @@ -3,11 +3,11 @@ ## MySqlDistributedLock(string, IDbTransaction, bool) Constructor -Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction'). - -NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends. -However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection. - +Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction'). + +NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends. +However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection. + Unless [exactName](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md index e5dfade0..ebeb82a0 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md @@ -3,8 +3,8 @@ ## MySqlDistributedLock(string, IDbConnection, bool) Constructor -Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection'). - +Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection'). + Unless [exactName](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md index 93a7146b..bdfad860 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md @@ -3,9 +3,9 @@ ## MySqlDistributedLock(string, string, Action, bool) Constructor -Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and -[options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options'). - +Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and +[options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options'). + Unless [exactName](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md index 9623669e..2087a17e 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.Acquire.r/fV/58/g2xfKSkMNPcJIQ.md @@ -3,14 +3,14 @@ ## MySqlDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md index 689f2eae..5aacdcf1 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.AcquireAsync.4BoOdZqpZP277VPAU321Nw.md @@ -3,14 +3,14 @@ ## MySqlDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md index b29c4ff3..d534e3ce 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquire.7Uu3aSVcXR87JPC85D/j6w.md @@ -3,14 +3,14 @@ ## MySqlDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md index 6c456475..3d7262fc 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.TryAcquireAsync.PuScySfWO2UMl6rfaBoiww.md @@ -3,14 +3,14 @@ ## MySqlDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedLock.md b/docs/api/DistributedLock.MySql/MySqlDistributedLock.md index 11503177..8273b3dc 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedLock.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedLock.md @@ -16,9 +16,9 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [MySqlDistributedLock(string, string, Action<MySqlConnectionOptionsBuilder>, bool)](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and
[options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options').

Unless [exactName](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | -| [MySqlDistributedLock(string, IDbConnection, bool)](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection').

Unless [exactName](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | -| [MySqlDistributedLock(string, IDbTransaction, bool)](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction').

NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends.
However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection.

Unless [exactName](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | +| [MySqlDistributedLock(string, string, Action<MySqlConnectionOptionsBuilder>, bool)](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).connectionString') and [options](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).options 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).options'). Unless [exactName](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.PsVoAEVfWkGp+4s0eOgjkA.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,string,System.Action_Medallion.Threading.MySql.MySqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [MySqlDistributedLock(string, IDbConnection, bool)](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).connection'). Unless [exactName](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.Gw0JTgvDod2OkXGtyloMgg.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [MySqlDistributedLock(string, IDbTransaction, bool)](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a lock with the given [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') that connects using the connection from the provided [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction'). NOTE that the lock will not be scoped to the [transaction](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') and must still be explicitly released before the transaction ends. However, this constructor allows the lock to PARTICIPATE in an ongoing transaction on a connection. Unless [exactName](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](MySqlDistributedLock..ctor.7PfsrTn0xgkLTsBbB0BbVw.md#Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.MySql.MySqlDistributedLock.MySqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md index ddf9f4bf..195ffac4 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md @@ -3,7 +3,7 @@ ## MySqlDistributedSynchronizationProvider.CreateLock(string, bool) Method -Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md index 1babcdcf..25839810 100644 --- a/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.MySql/MySqlDistributedSynchronizationProvider.md @@ -22,4 +22,4 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Methods | | | :--- | :--- | -| [CreateLock(string, bool)](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | +| [CreateLock(string, bool)](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [MySqlDistributedLock](MySqlDistributedLock.md 'Medallion.Threading.MySql.MySqlDistributedLock') with the provided [name](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](MySqlDistributedSynchronizationProvider.CreateLock.BfFkX376FOT5FK96U7Fr1g.md#Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.MySql.MySqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md b/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md index 86367d80..cb41c30b 100644 --- a/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md +++ b/docs/api/DistributedLock.Oracle/Medallion.Threading.Oracle.md @@ -10,4 +10,4 @@ | [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') | Implements an upgradeable distributed reader-writer lock for the Oracle database using the DBMS_LOCK package. | | [OracleDistributedReaderWriterLockHandle](OracleDistributedReaderWriterLockHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [OracleDistributedReaderWriterLockUpgradeableHandle](OracleDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLockUpgradeableHandle') | Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | -| [OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock')
and [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') | +| [OracleDistributedSynchronizationProvider](OracleDistributedSynchronizationProvider.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') and [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') | diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md index d4c6d4fc..2d5613c4 100644 --- a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md @@ -3,11 +3,11 @@ ## OracleConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method -Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')). - -However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for -a long time, you can set a value for keepalive to prevent this from happening. - +Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')). + +However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for +a long time, you can set a value for keepalive to prevent this from happening. + See https://stackoverflow.com/questions/1966247/idle-timeout-parameter-in-oracle. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md index f17cb143..0e32628f 100644 --- a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md @@ -3,19 +3,19 @@ ## OracleConnectionOptionsBuilder.UseMultiplexing(bool) Method -This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) -a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is -often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. - -Multiplexing is on by default. - -This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an -Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing -strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) -connection will be allocated. - -This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also -particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md index 13289e1a..7e8166a1 100644 --- a/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md +++ b/docs/api/DistributedLock.Oracle/OracleConnectionOptionsBuilder.md @@ -13,5 +13,5 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [KeepaliveCadence(TimeSpan)](OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')).

However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for
a long time, you can set a value for keepalive to prevent this from happening.

See https://stackoverflow.com/questions/1966247/idle-timeout-parameter-in-oracle. | -| [UseMultiplexing(bool)](OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | +| [KeepaliveCadence(TimeSpan)](OracleConnectionOptionsBuilder.KeepaliveCadence.cpYoNdk/QhqJGH/58Hukqw.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Oracle does not kill idle connections by default, so by default keepalive is disabled (set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan')). However, if you are using the IDLE_TIME setting in Oracle or if your network is dropping connections that are idle holding locks for a long time, you can set a value for keepalive to prevent this from happening. See https://stackoverflow.com/questions/1966247/idle-timeout-parameter-in-oracle. | +| [UseMultiplexing(bool)](OracleConnectionOptionsBuilder.UseMultiplexing.A+iIKatFl3VDvz/7Q6X3Jg.md 'Medallion.Threading.Oracle.OracleConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. Multiplexing is on by default. This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) connection will be allocated. This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md index b5e331dd..d463b5b5 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md @@ -3,9 +3,9 @@ ## OracleDistributedLock(string, string, Action, bool) Constructor -Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and -[options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options'). - +Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and +[options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options'). + Unless [exactName](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md index b2b9caf8..5a1db908 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md @@ -3,8 +3,8 @@ ## OracleDistributedLock(string, IDbConnection, bool) Constructor -Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection'). - +Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection'). + Unless [exactName](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md index 1871050c..5baab860 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.Acquire.+4c1n2Rm+XfIwQt9S5GCNA.md @@ -3,14 +3,14 @@ ## OracleDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md index 5eb48991..8e85142d 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.AcquireAsync.DWy8bDbjQOspqGdARG5H5Q.md @@ -3,14 +3,14 @@ ## OracleDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md index 5dcb03fb..d220f837 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquire.jxpTPDKrpAohkKglVpscdw.md @@ -3,14 +3,14 @@ ## OracleDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md index 9a55caff..4fa40f0b 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.TryAcquireAsync.2c/SHuju3pt92jk0aHMPqQ.md @@ -3,14 +3,14 @@ ## OracleDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedLock.md b/docs/api/DistributedLock.Oracle/OracleDistributedLock.md index 400874e3..f13c7b81 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedLock.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedLock.md @@ -16,8 +16,8 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [OracleDistributedLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and
[options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options').

Unless [exactName](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | -| [OracleDistributedLock(string, IDbConnection, bool)](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection').

Unless [exactName](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') that connects using the provided [connectionString](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).connectionString') and [options](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).options 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).options'). Unless [exactName](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedLock..ctor.2/b645uSsJRoN1RGNqS0EQ.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedLock(string, IDbConnection, bool)](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a lock with the given [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') that connects using the provided [connection](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).connection'). Unless [exactName](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedLock..ctor.ruFnlqTt8A/yRSLZE0t3dA.md#Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedLock.OracleDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md index cd07ba3a..385edc71 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md @@ -3,10 +3,10 @@ ## OracleDistributedReaderWriterLock(string, string, Action, bool) Constructor -Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name'). - -The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. - +Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name'). + +The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + Unless [exactName](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md index 4b49f016..3739ec83 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md @@ -3,11 +3,11 @@ ## OracleDistributedReaderWriterLock(string, IDbConnection, bool) Constructor -Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). - -The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and -will not be opened or closed. - +Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + Unless [exactName](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md index ab4401a8..4b6b0bbc 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLock.i+1DmU9e9egRXs1g6b3Gpw.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method -Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (myLock.AcquireReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md index d0ae850d..de647c7c 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireReadLockAsync.cHH807x/OmDfG5O0jJHDbg.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md index ddd14b7d..2920e431 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock.R7oQaBTKIoxOXrOAlSXjVw.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method -Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (myLock.AcquireUpgradeableReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md index a46b22a9..4545197a 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.ResKtbEYMnwtBr+1n8rCVA.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method -Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireUpgradeableReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md index b433e238..07e28e96 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLock.EHh6icCC0sW+KpPfQpbkqw.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method -Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (myLock.AcquireWriteLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md index 4f962744..a116b58d 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.AcquireWriteLockAsync.i6hqw6JHp5wzxI8GbW0daA.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md index a02393e8..b7c87198 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLock.hJ8GIzamtceZzMUxp70TPQ.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md index 8e70d9cd..a04a8ee9 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireReadLockAsync.IEoPoW7dEaZKcc46gq1JiQ.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md index e1a9bc6d..918e58fb 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.pCah2aRljYOlO0JIWgorWA.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md index d4323d52..d3af15cb 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.21/n2EnWZfs+furVMXeXQ.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md index a549cf3a..3c5cbe63 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLock.z52QOCPLLTcPg/Rkv1mHYQ.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireWriteLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md index 9b95c63d..42a36a7a 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync.N34kqc/h8laY2Ll0B3qHLA.md @@ -3,14 +3,14 @@ ## OracleDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md index eca3f20a..2618aa71 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedReaderWriterLock.md @@ -17,8 +17,8 @@ Implements [IDistributedUpgradeableReaderWriterLock](https://github.com/madelson | Constructors | | | :--- | :--- | -| [OracleDistributedReaderWriterLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name').

The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | -| [OracleDistributedReaderWriterLock(string, IDbConnection, bool)](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedReaderWriterLock(string, string, Action<OracleConnectionOptionsBuilder>, bool)](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name'). The provided [connectionString](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. Unless [exactName](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.8lBF247l20W+SBlWEwdqmQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.Oracle.OracleConnectionOptionsBuilder_,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [OracleDistributedReaderWriterLock(string, IDbConnection, bool)](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). The provided [connection](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and will not be opened or closed. Unless [exactName](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](OracleDistributedReaderWriterLock..ctor.JHJcHUumz9o6mcMVD9M0SQ.md#Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock.OracleDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md index 89c2430d..b9b02064 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md @@ -3,7 +3,7 @@ ## OracleDistributedSynchronizationProvider.CreateLock(string, bool) Method -Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md index 127ff692..b9657694 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md @@ -3,7 +3,7 @@ ## OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool) Method -Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') +Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md index 03d6297f..29aa7068 100644 --- a/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.Oracle/OracleDistributedSynchronizationProvider.md @@ -3,7 +3,7 @@ ## OracleDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') and [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') ```csharp @@ -24,5 +24,5 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Methods | | | :--- | :--- | -| [CreateLock(string, bool)](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | -| [CreateReaderWriterLock(string, bool)](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName')
is specified, invalid names will be escaped/hashed. | +| [CreateLock(string, bool)](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [OracleDistributedLock](OracleDistributedLock.md 'Medallion.Threading.Oracle.OracleDistributedLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateLock.7wcJ5e/hOrfQ/3Ylf2MDrw.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. | +| [CreateReaderWriterLock(string, bool)](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Creates a [OracleDistributedReaderWriterLock](OracleDistributedReaderWriterLock.md 'Medallion.Threading.Oracle.OracleDistributedReaderWriterLock') with the provided [name](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](OracleDistributedSynchronizationProvider.CreateReaderWriterLock.c5P1XG9aduRCEZMRz2ynkQ.md#Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.Oracle.OracleDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') is specified, invalid names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md b/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md index ee5b3cdc..e0936c57 100644 --- a/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md +++ b/docs/api/DistributedLock.Postgres/Medallion.Threading.Postgres.md @@ -5,12 +5,12 @@ | Classes | | | :--- | :--- | | [PostgresConnectionOptionsBuilder](PostgresConnectionOptionsBuilder.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder') | Specifies options for connecting to and locking against a Postgres database | -| [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') | Implements a distributed lock using Postgres advisory locks
(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | +| [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') | Implements a distributed lock using Postgres advisory locks (see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | | [PostgresDistributedLockHandle](PostgresDistributedLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') | Implements a distributed lock using Postgres advisory locks
(see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | +| [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock') | Implements a distributed lock using Postgres advisory locks (see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) | | [PostgresDistributedReaderWriterLockHandle](PostgresDistributedReaderWriterLockHandle.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock'). | +| [PostgresDistributedSynchronizationProvider](PostgresDistributedSynchronizationProvider.md 'Medallion.Threading.Postgres.PostgresDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock'). | | Structs | | | :--- | :--- | -| [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') | Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap).
See https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS | +| [PostgresAdvisoryLockKey](PostgresAdvisoryLockKey.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey') | Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap). See https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS | diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md index a09b622b..df038d42 100644 --- a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md @@ -3,7 +3,7 @@ ## PostgresAdvisoryLockKey(int, int) Constructor -Constructs a key from a pair of 32-bit values. This is a separate key space +Constructs a key from a pair of 32-bit values. This is a separate key space than [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)'). ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md index 3933aec2..392d6ea6 100644 --- a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md @@ -3,14 +3,14 @@ ## PostgresAdvisoryLockKey(string, bool) Constructor -Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name'). - -If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys. - -If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with -any other key based on such a string or based on a 32-bit value. - -Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to +Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name'). + +If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys. + +If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with +any other key based on such a string or based on a 32-bit value. + +Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to a 64-bit key value. ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md index 2d6d9a32..d6a108a9 100644 --- a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md @@ -3,7 +3,7 @@ ## PostgresAdvisoryLockKey(long) Constructor -Constructs a key from a single 64-bit value. This is a separate key space +Constructs a key from a single 64-bit value. This is a separate key space than [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)'). ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md index b62300aa..f3dd31a9 100644 --- a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.ToString().md @@ -3,7 +3,7 @@ ## PostgresAdvisoryLockKey.ToString() Method -Returns a string representation of the key that can be round-tripped through +Returns a string representation of the key that can be round-tripped through [PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md index 553528fd..97288e91 100644 --- a/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md +++ b/docs/api/DistributedLock.Postgres/PostgresAdvisoryLockKey.md @@ -3,7 +3,7 @@ ## PostgresAdvisoryLockKey Struct -Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap). +Acts as the "name" of a distributed lock in Postgres. Consists of one 64-bit value or two 32-bit values (the spaces do not overlap). See https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS ```csharp @@ -15,16 +15,16 @@ Implements [System.IEquatable<](https://docs.microsoft.com/en-us/dotnet/api/S | Constructors | | | :--- | :--- | -| [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)') | Constructs a key from a pair of 32-bit values. This is a separate key space
than [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)'). | -| [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)') | Constructs a key from a single 64-bit value. This is a separate key space
than [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)'). | -| [PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name').

If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys.

If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with
any other key based on such a string or based on a 32-bit value.

Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to
a 64-bit key value. | +| [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)') | Constructs a key from a pair of 32-bit values. This is a separate key space than [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)'). | +| [PostgresAdvisoryLockKey(long)](PostgresAdvisoryLockKey..ctor.zWR+TwIbSGzvQzL9/uWeBQ.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(long)') | Constructs a key from a single 64-bit value. This is a separate key space than [PostgresAdvisoryLockKey(int, int)](PostgresAdvisoryLockKey..ctor.LedpDNSMoNGTkn636aYbow.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(int, int)'). | +| [PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | Constructs a key based on a string [name](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).name 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).name'). If the string is of the form "{16-digit hex}" or "{8-digit hex},{8-digit hex}", this will be parsed into numeric keys. If the string is an ascii string with 9 or fewer characters, it will be mapped to a key that does not collide with any other key based on such a string or based on a 32-bit value. Other string names will be rejected unless [allowHashing](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md#Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string,bool).allowHashing 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool).allowHashing') is specified, in which case it will be hashed to a 64-bit key value. | | Methods | | | :--- | :--- | | [Equals(PostgresAdvisoryLockKey)](PostgresAdvisoryLockKey.Equals.+QU35/RcjHTGcjW0iCLCkA.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(Medallion.Threading.Postgres.PostgresAdvisoryLockKey)') | Implements [System.IEquatable<>.Equals(@0)](https://docs.microsoft.com/en-us/dotnet/api/System.IEquatable-1.Equals#System_IEquatable_1_Equals__0_ 'System.IEquatable`1.Equals(`0)') | | [Equals(object)](PostgresAdvisoryLockKey.Equals.hCSLKXsGZ9vchAeOS3hn/Q.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.Equals(object)') | Implements [System.Object.Equals(System.Object)](https://docs.microsoft.com/en-us/dotnet/api/System.Object.Equals#System_Object_Equals_System_Object_ 'System.Object.Equals(System.Object)') | | [GetHashCode()](PostgresAdvisoryLockKey.GetHashCode().md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.GetHashCode()') | Implements [System.Object.GetHashCode](https://docs.microsoft.com/en-us/dotnet/api/System.Object.GetHashCode 'System.Object.GetHashCode') | -| [ToString()](PostgresAdvisoryLockKey.ToString().md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.ToString()') | Returns a string representation of the key that can be round-tripped through
[PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | +| [ToString()](PostgresAdvisoryLockKey.ToString().md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.ToString()') | Returns a string representation of the key that can be round-tripped through [PostgresAdvisoryLockKey(string, bool)](PostgresAdvisoryLockKey..ctor.nrSDuGGKUsKtcB73EU1nXg.md 'Medallion.Threading.Postgres.PostgresAdvisoryLockKey.PostgresAdvisoryLockKey(string, bool)') | | Operators | | | :--- | :--- | diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md index f53f2d27..5f1f8e4a 100644 --- a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md @@ -3,11 +3,11 @@ ## PostgresConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method -Some Postgres setups have automation in place which aggressively kills idle connections. - -To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. -Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. - +Some Postgres setups have automation in place which aggressively kills idle connections. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. +Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. + Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'), which disables keepalive. ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md index 0ebac02a..56e7b1fb 100644 --- a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md @@ -3,19 +3,19 @@ ## PostgresConnectionOptionsBuilder.UseMultiplexing(bool) Method -This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) -a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is -often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. - -Multiplexing is on by default. - -This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an -Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing -strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) -connection will be allocated. - -This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also -particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md index 6d7743eb..b1e397e9 100644 --- a/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md +++ b/docs/api/DistributedLock.Postgres/PostgresConnectionOptionsBuilder.md @@ -13,5 +13,5 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [KeepaliveCadence(TimeSpan)](PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Some Postgres setups have automation in place which aggressively kills idle connections.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.
Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it.

Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'), which disables keepalive. | -| [UseMultiplexing(bool)](PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | +| [KeepaliveCadence(TimeSpan)](PostgresConnectionOptionsBuilder.KeepaliveCadence.3nQNyNVWx1MTQ4W8SFqI9w.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Some Postgres setups have automation in place which aggressively kills idle connections. To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. Defaults to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'), which disables keepalive. | +| [UseMultiplexing(bool)](PostgresConnectionOptionsBuilder.UseMultiplexing.iaWbIbzQ+9I/FdhQ+S89ng.md 'Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. Multiplexing is on by default. This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) connection will be allocated. This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md index cb4a4e40..ea8668a9 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md @@ -3,7 +3,7 @@ ## PostgresDistributedLock(PostgresAdvisoryLockKey, string, Action) Constructor -Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), +Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), and [options](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md index c3b0f3cd..97677c40 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.Acquire.wevmsPrIfDcimdIlhBziiw.md @@ -3,14 +3,14 @@ ## PostgresDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md index 4b7a6d2a..9f6d09cd 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.AcquireAsync.Vmz1wx/1suZB7AWMDkEWqA.md @@ -3,14 +3,14 @@ ## PostgresDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md index 8d476086..b60447be 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquire.m+KJTn2pfMV+kQiMfrpLuQ.md @@ -3,14 +3,14 @@ ## PostgresDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md index 8592d9f1..ec162b3f 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.TryAcquireAsync.vpSo9yMiuK1NYo8xC2ACUw.md @@ -3,14 +3,14 @@ ## PostgresDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md index b5562609..1b6057bb 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedLock.md @@ -3,7 +3,7 @@ ## PostgresDistributedLock Class -Implements a distributed lock using Postgres advisory locks +Implements a distributed lock using Postgres advisory locks (see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) ```csharp @@ -17,7 +17,7 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [PostgresDistributedLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'),
and [options](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | +| [PostgresDistributedLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), and [options](PostgresDistributedLock..ctor.zD9lmiuiSMIu1mI+FfWXDQ.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | | [PostgresDistributedLock(PostgresAdvisoryLockKey, IDbConnection)](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection)') | Constructs a lock with the given [key](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedLock..ctor.WrNsj1JRkAGtaHLdHnRFrg.md#Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedLock.PostgresDistributedLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). | | Properties | | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md index b1a962da..a480214f 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md @@ -3,7 +3,7 @@ ## PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, string, Action) Constructor -Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), +Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), and [options](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md index de299a67..19ce11c7 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLock.F28FR+b8mvglU+XBswMyuw.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method -Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (myLock.AcquireReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md index 643fd278..884003c1 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireReadLockAsync.TMCUkzQtH1Cc5G6akBfClw.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md index 9c25d5c2..edbe68ea 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLock.FExQhZC0WBEj7urzZq2J3g.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method -Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (myLock.AcquireWriteLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md index befd6749..4c696460 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.AcquireWriteLockAsync.idZYzSuwm8J87ACMr/oI1g.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md index 5e67e7b0..a05df5b0 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLock.uH/chMVDaFHN9df7XbbnXg.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md index c3440dcd..e87f3598 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync.e4VL9+L71L28yd6spXQ36Q.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md index 20369a53..b77a358b 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLock.apGt13uh3dT6sqhtZGuJ/g.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireWriteLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md index 4bbd9bbc..18258109 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync.KuAeRuowsuEAdyQCqKQqGA.md @@ -3,14 +3,14 @@ ## PostgresDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md index d93d2294..692b5638 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedReaderWriterLock.md @@ -3,7 +3,7 @@ ## PostgresDistributedReaderWriterLock Class -Implements a distributed lock using Postgres advisory locks +Implements a distributed lock using Postgres advisory locks (see https://www.postgresql.org/docs/12/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS) ```csharp @@ -17,7 +17,7 @@ Implements [IDistributedReaderWriterLock](https://github.com/madelson/Distribute | Constructors | | | :--- | :--- | -| [PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'),
and [options](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | +| [PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, string, Action<PostgresConnectionOptionsBuilder>)](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action)') | Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).key') (effectively the lock name), [connectionString](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).connectionString 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).connectionString'), and [options](PostgresDistributedReaderWriterLock..ctor.Gk53rLHLcZCRtaFskSoaPw.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,string,System.Action_Medallion.Threading.Postgres.PostgresConnectionOptionsBuilder_).options 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, string, System.Action).options') | | [PostgresDistributedReaderWriterLock(PostgresAdvisoryLockKey, IDbConnection)](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection)') | Constructs a lock with the given [key](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).key 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).key') (effectively the lock name) and [connection](PostgresDistributedReaderWriterLock..ctor.W6WkSdoxDDf2G56xXhWE6A.md#Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey,System.Data.IDbConnection).connection 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock.PostgresDistributedReaderWriterLock(Medallion.Threading.Postgres.PostgresAdvisoryLockKey, System.Data.IDbConnection).connection'). | | Properties | | diff --git a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md index 3143549f..7ffb8fd4 100644 --- a/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.Postgres/PostgresDistributedSynchronizationProvider.md @@ -3,7 +3,7 @@ ## PostgresDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [PostgresDistributedLock](PostgresDistributedLock.md 'Medallion.Threading.Postgres.PostgresDistributedLock') and [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [PostgresDistributedReaderWriterLock](PostgresDistributedReaderWriterLock.md 'Medallion.Threading.Postgres.PostgresDistributedReaderWriterLock'). ```csharp diff --git a/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md b/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md index a9966b0f..26769a2f 100644 --- a/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md +++ b/docs/api/DistributedLock.Redis/Medallion.Threading.Redis.md @@ -11,4 +11,4 @@ | [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') | Implements a [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') using Redis. | | [RedisDistributedSemaphoreHandle](RedisDistributedSemaphoreHandle.md 'Medallion.Threading.Redis.RedisDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') for a [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore') | | [RedisDistributedSynchronizationOptionsBuilder](RedisDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder') | Options for configuring a redis-based distributed synchronization algorithm | -| [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'),
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore'). | +| [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md index c6c5e8c6..59bc5f5d 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.Acquire.AACQakRhT+jw+D9lUnMpvw.md @@ -3,14 +3,14 @@ ## RedisDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md index 7d69b6a1..0dfb144c 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.AcquireAsync/QjYv9rC4HwcQmk9yh4x5g.md @@ -3,14 +3,14 @@ ## RedisDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md index 8b642fa9..70deb6da 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquire.XoE9A2OxVcVYbo4P3xgjoQ.md @@ -3,14 +3,14 @@ ## RedisDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md index 5dde8e48..effdcd3d 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedLock.TryAcquireAsync.hVlE8jBuI52oxFuu/5kjZQ.md @@ -3,14 +3,14 @@ ## RedisDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md index c51a6cc0..1d98621e 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLock.GS/oxr4gs+xtfk1ETgOWmw.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method -Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (myLock.AcquireReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md index 7308a0cf..eb4dddb6 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireReadLockAsync.MulU+rDIiVoqbqS3UTbXAQ.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md index 0c3adfcd..1b0bf655 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLock.YwKKFoPQWjNEfdJJvQSF/g.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method -Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (myLock.AcquireWriteLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md index 9d5d108e..3e16d8ed 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.AcquireWriteLockAsync.c6gUWdEVq8dyvt3FjZ1WHQ.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md index c1523728..e5eadfad 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLock.zPT2XvcUGrKdO7gWgH/92A.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md index 8a1995dc..6ff9206e 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireReadLockAsync.Yvz5YbbYsaQpJ1VRxOlDbA.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md index 3a9ee172..53ca7797 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLock.4LTOnaHbGBHjx+9nGJBVeA.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireWriteLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md index a77bc288..a31e4072 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync.YImMhMY0HkmT+sGtz+4NHA.md @@ -3,14 +3,14 @@ ## RedisDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md index 46545889..94740617 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.Acquire.05VsmfQgFRAZncIw+TCkEw.md @@ -3,14 +3,14 @@ ## RedisDistributedSemaphore.Acquire(Nullable, CancellationToken) Method -Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (mySemaphore.Acquire(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md index 5f262db9..8f35f356 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.AcquireAsync.RuA3UY/DINCj0PXg31neVA.md @@ -3,14 +3,14 @@ ## RedisDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method -Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await mySemaphore.AcquireAsync(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md index a39d7c0d..d42b1c32 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquire.gnffYYV8n2g0EsmkoLRNwg.md @@ -3,14 +3,14 @@ ## RedisDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket synchronously. Usage: - -```csharp -using (var handle = mySemaphore.TryAcquire(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md index 69be8c34..702d9c48 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSemaphore.TryAcquireAsync.I7HQi6Sg7LlrmSYRDl9JHQ.md @@ -3,14 +3,14 @@ ## RedisDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket asynchronously. Usage: - -```csharp -await using (var handle = await mySemaphore.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md index c74c66a2..0a8ed74b 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md @@ -3,15 +3,15 @@ ## RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime(TimeSpan, TimeSpan) Method -Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps. -This determines how much time is spent sleeping between attempts. Lower values will raise the -volume of acquire requests under contention but will also raise the responsiveness (how long -it takes a waiter to notice that a contended the lock has become available). - -Specifying a range of values allows the implementation to select an actual value in the range -at random for each sleep. This helps avoid the case where two clients become "synchronized" -in such a way that results in one client monopolizing the lock. - +Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps. +This determines how much time is spent sleeping between attempts. Lower values will raise the +volume of acquire requests under contention but will also raise the responsiveness (how long +it takes a waiter to notice that a contended the lock has become available). + +Specifying a range of values allows the implementation to select an actual value in the range +at random for each sleep. This helps avoid the case where two clients become "synchronized" +in such a way that results in one client monopolizing the lock. + The default is [10ms, 800ms] ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md index 215251ff..28596fc3 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md @@ -3,12 +3,12 @@ ## RedisDistributedSynchronizationOptionsBuilder.Expiry(TimeSpan) Method -Specifies how long the lock will last, absent auto-extension. Because auto-extension exists, -this value generally will have little effect on program behavior. However, making the expiry longer means that -auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned -without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes -would need to wait in order to acquire it. - +Specifies how long the lock will last, absent auto-extension. Because auto-extension exists, +this value generally will have little effect on program behavior. However, making the expiry longer means that +auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned +without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes +would need to wait in order to acquire it. + Defaults to 30s. ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md index 5d60a8a6..5be4e7ff 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md @@ -3,10 +3,10 @@ ## RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence(TimeSpan) Method -Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests -but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in -before the lock expiry elapses. - +Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests +but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in +before the lock expiry elapses. + Defaults to 1/3 of the specified [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)'). ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md index 3041f214..f2e3eb6a 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md @@ -3,11 +3,11 @@ ## RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(TimeSpan) Method -The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount -of time to acquire the lock, we will not have all of expiry available upon acquisition. - -This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes. - +The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount +of time to acquire the lock, we will not have all of expiry available upon acquisition. + +This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes. + Defaults to 90% of the specified lock expiry. ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md index 5a7fd13a..69fb9388 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationOptionsBuilder.md @@ -13,7 +13,7 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [BusyWaitSleepTime(TimeSpan, TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps.
This determines how much time is spent sleeping between attempts. Lower values will raise the
volume of acquire requests under contention but will also raise the responsiveness (how long
it takes a waiter to notice that a contended the lock has become available).

Specifying a range of values allows the implementation to select an actual value in the range
at random for each sleep. This helps avoid the case where two clients become "synchronized"
in such a way that results in one client monopolizing the lock.

The default is [10ms, 800ms] | -| [Expiry(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.Expiry(System.TimeSpan)') | Specifies how long the lock will last, absent auto-extension. Because auto-extension exists,
this value generally will have little effect on program behavior. However, making the expiry longer means that
auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned
without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes
would need to wait in order to acquire it.

Defaults to 30s. | -| [ExtensionCadence(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence(System.TimeSpan)') | Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests
but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in
before the lock expiry elapses.

Defaults to 1/3 of the specified [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)'). | -| [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)') | The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount
of time to acquire the lock, we will not have all of expiry available upon acquisition.

This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes.

Defaults to 90% of the specified lock expiry. | +| [BusyWaitSleepTime(TimeSpan, TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime.Z/k+WORQrlfNeKapMJREAw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.BusyWaitSleepTime(System.TimeSpan, System.TimeSpan)') | Waiting to acquire a lock requires a busy wait that alternates acquire attempts and sleeps. This determines how much time is spent sleeping between attempts. Lower values will raise the volume of acquire requests under contention but will also raise the responsiveness (how long it takes a waiter to notice that a contended the lock has become available). Specifying a range of values allows the implementation to select an actual value in the range at random for each sleep. This helps avoid the case where two clients become "synchronized" in such a way that results in one client monopolizing the lock. The default is [10ms, 800ms] | +| [Expiry(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.Expiry.Aq56pTIqK1xlhiCtghZSyQ.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.Expiry(System.TimeSpan)') | Specifies how long the lock will last, absent auto-extension. Because auto-extension exists, this value generally will have little effect on program behavior. However, making the expiry longer means that auto-extension requests can occur less frequently, saving resources. On the other hand, when a lock is abandoned without explicit release (e. g. if the holding process crashes), the expiry determines how long other processes would need to wait in order to acquire it. Defaults to 30s. | +| [ExtensionCadence(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence.cKv2f155zX3kr5YAmhrxcw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.ExtensionCadence(System.TimeSpan)') | Determines how frequently the lock will be extended while held. More frequent extension means more unnecessary requests but also a lower chance of losing the lock due to the process hanging or otherwise failing to get its extension request in before the lock expiry elapses. Defaults to 1/3 of the specified [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)'). | +| [MinValidityTime(TimeSpan)](RedisDistributedSynchronizationOptionsBuilder.MinValidityTime.fMaY2fG5om4C0LuUfUZtNg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder.MinValidityTime(System.TimeSpan)') | The lock expiry determines how long the lock will be held without being extended. However, since it takes some amount of time to acquire the lock, we will not have all of expiry available upon acquisition. This value sets a minimum amount which we'll be guaranteed to have left once acquisition completes. Defaults to 90% of the specified lock expiry. | diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md index d9b532cf..aebed108 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md @@ -3,10 +3,10 @@ ## RedisDistributedSynchronizationProvider(IEnumerable, Action) Constructor -Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases') -and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options'). - -Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first +Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases') +and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options'). + +Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase'). ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md index f0402a74..c216e765 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md @@ -3,7 +3,7 @@ ## RedisDistributedSynchronizationProvider(IDatabase, Action) Constructor -Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database') +Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database') and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).options'). ```csharp diff --git a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md index 343d81ca..bf8a0e52 100644 --- a/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.Redis/RedisDistributedSynchronizationProvider.md @@ -3,8 +3,8 @@ ## RedisDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'), -[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'), +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [RedisDistributedLock](RedisDistributedLock.md 'Medallion.Threading.Redis.RedisDistributedLock'), +[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [RedisDistributedReaderWriterLock](RedisDistributedReaderWriterLock.md 'Medallion.Threading.Redis.RedisDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [RedisDistributedSemaphore](RedisDistributedSemaphore.md 'Medallion.Threading.Redis.RedisDistributedSemaphore'). ```csharp @@ -20,8 +20,8 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Constructors | | | :--- | :--- | -| [RedisDistributedSynchronizationProvider(IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database')
and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).options'). | -| [RedisDistributedSynchronizationProvider(IEnumerable<IDatabase>, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases')
and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options').

Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first
[StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase'). | +| [RedisDistributedSynchronizationProvider(IDatabase, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [database](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).database 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).database') and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.3LNpdsaHyIM4ZSmOWVrquw.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(IDatabase, System.Action).options'). | +| [RedisDistributedSynchronizationProvider(IEnumerable<IDatabase>, Action<RedisDistributedSynchronizationOptionsBuilder>)](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action)') | Constructs a [RedisDistributedSynchronizationProvider](RedisDistributedSynchronizationProvider.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider') that connects to the provided [databases](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).databases 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).databases') and uses the provided [options](RedisDistributedSynchronizationProvider..ctor.0IYlzCbIJ15NKFmgWswPEg.md#Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable_IDatabase_,System.Action_Medallion.Threading.Redis.RedisDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.RedisDistributedSynchronizationProvider(System.Collections.Generic.IEnumerable, System.Action).options'). Note that if multiple [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase')s are provided, [CreateSemaphore(RedisKey, int)](RedisDistributedSynchronizationProvider.CreateSemaphore.ChIw2HaeWq+X0D2xMfTfjg.md 'Medallion.Threading.Redis.RedisDistributedSynchronizationProvider.CreateSemaphore(RedisKey, int)') will use only the first [StackExchange.Redis.IDatabase](https://docs.microsoft.com/en-us/dotnet/api/StackExchange.Redis.IDatabase 'StackExchange.Redis.IDatabase'). | | Methods | | | :--- | :--- | diff --git a/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md b/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md index 1e89bf13..382a2fb7 100644 --- a/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md +++ b/docs/api/DistributedLock.SqlServer/Medallion.Threading.SqlServer.md @@ -5,11 +5,11 @@ | Classes | | | :--- | :--- | | [SqlConnectionOptionsBuilder](SqlConnectionOptionsBuilder.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder') | Specifies options for connecting to and locking against a SQL database | -| [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') | Implements a distributed lock using a SQL server application lock
(see https://msdn.microsoft.com/en-us/library/ms189823.aspx) | +| [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') | Implements a distributed lock using a SQL server application lock (see https://msdn.microsoft.com/en-us/library/ms189823.aspx) | | [SqlDistributedLockHandle](SqlDistributedLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') | Implements reader-writer lock semantics using a SQL server application lock
(see https://msdn.microsoft.com/en-us/library/ms189823.aspx).

This class supports the following patterns:
* Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)'))
* Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)'))
* Upgradeable read locks similar to [System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock 'System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock') (using [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') and [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)')) | +| [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') | Implements reader-writer lock semantics using a SQL server application lock (see https://msdn.microsoft.com/en-us/library/ms189823.aspx). This class supports the following patterns: * Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)')) * Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)')) * Upgradeable read locks similar to [System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock 'System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock') (using [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') and [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)')) | | [SqlDistributedReaderWriterLockHandle](SqlDistributedReaderWriterLockHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [SqlDistributedReaderWriterLockUpgradeableHandle](SqlDistributedReaderWriterLockUpgradeableHandle.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLockUpgradeableHandle') | Implements [IDistributedLockUpgradeableHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.md 'Medallion.Threading.IDistributedLockUpgradeableHandle') | | [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') | Implements a distributed semaphore using SQL Server constructs. | | [SqlDistributedSemaphoreHandle](SqlDistributedSemaphoreHandle.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'),
[IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore'). | +| [SqlDistributedSynchronizationProvider](SqlDistributedSynchronizationProvider.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'), [IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md index 56db7d32..2f0b8540 100644 --- a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md @@ -3,16 +3,16 @@ ## SqlConnectionOptionsBuilder.KeepaliveCadence(TimeSpan) Method -Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor -which proactively kills idle connections. - -To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. -Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. - -To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'). - -Defaults to 10 minutes based on Azure's 30 minute default behavior. - +Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor +which proactively kills idle connections. + +To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. +Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. + +To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'). + +Defaults to 10 minutes based on Azure's 30 minute default behavior. + For more information, see the dicussion on https://github.com/madelson/DistributedLock/issues/5 ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md index 83624a76..afe134ce 100644 --- a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md @@ -3,19 +3,19 @@ ## SqlConnectionOptionsBuilder.UseMultiplexing(bool) Method -This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) -a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is -often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. - -Multiplexing is on by default. - -This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an -Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing -strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) -connection will be allocated. - -This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also -particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') +This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) +a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is +often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. + +Multiplexing is on by default. + +This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an +Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing +strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) +connection will be allocated. + +This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also +particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md index 47654b32..0096e217 100644 --- a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md @@ -3,11 +3,11 @@ ## SqlConnectionOptionsBuilder.UseTransaction(bool) Method -Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false. - -Synchronizing based on a transaction is marginally less expensive than using a connection -because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction'). -The disadvantage is that using this strategy may lead to long-running transactions, which can be +Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false. + +Synchronizing based on a transaction is marginally less expensive than using a connection +because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction'). +The disadvantage is that using this strategy may lead to long-running transactions, which can be problematic for databases using the full recovery model. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md index 653ed035..bd9c6d97 100644 --- a/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md +++ b/docs/api/DistributedLock.SqlServer/SqlConnectionOptionsBuilder.md @@ -13,6 +13,6 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [KeepaliveCadence(TimeSpan)](SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor
which proactively kills idle connections.

To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock.
Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it.

To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan').

Defaults to 10 minutes based on Azure's 30 minute default behavior.

For more information, see the dicussion on https://github.com/madelson/DistributedLock/issues/5 | -| [UseMultiplexing(bool)](SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive)
a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is
often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time.

Multiplexing is on by default.

This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an
Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing
strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable)
connection will be allocated.

This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also
particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)')
semantics are used with a zero-length timeout. | -| [UseTransaction(bool)](SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseTransaction(bool)') | Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false.

Synchronizing based on a transaction is marginally less expensive than using a connection
because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction').
The disadvantage is that using this strategy may lead to long-running transactions, which can be
problematic for databases using the full recovery model. | +| [KeepaliveCadence(TimeSpan)](SqlConnectionOptionsBuilder.KeepaliveCadence.Y0oyczbLNxA6zX68I22Kzg.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.KeepaliveCadence(System.TimeSpan)') | Using SQL Azure as a distributed synchronization provider can be challenging due to Azure's aggressive connection governor which proactively kills idle connections. To prevent this, this option sets the cadence at which we run a no-op "keepalive" query on a connection that is holding a lock. Note that this still does not guarantee protection for the connection from all conditions where the governor might kill it. To disable keepalive, set to [System.Threading.Timeout.InfiniteTimeSpan](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Timeout.InfiniteTimeSpan 'System.Threading.Timeout.InfiniteTimeSpan'). Defaults to 10 minutes based on Azure's 30 minute default behavior. For more information, see the dicussion on https://github.com/madelson/DistributedLock/issues/5 | +| [UseMultiplexing(bool)](SqlConnectionOptionsBuilder.UseMultiplexing.Bompdy7BJ8LPLMDka9l5hA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseMultiplexing(bool)') | This mode takes advantage of the fact that while "holding" a lock (or other synchronization primitive) a connection is essentially idle. Thus, rather than creating a new connection for each held lock it is often possible to multiplex a shared connection so that that connection can hold multiple locks at the same time. Multiplexing is on by default. This is implemented in such a way that releasing a lock held on such a connection will never be blocked by an Acquire() call that is waiting to acquire a lock on that same connection. For this reason, the multiplexing strategy is "optimistic": if the lock can't be acquired instantaneously on the shared connection, a new (shareable) connection will be allocated. This option can improve performance and avoid connection pool starvation in high-load scenarios. It is also particularly applicable to cases where [TryAcquire(TimeSpan, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.TryAcquire.GcM73KNvUAY5aoOOhgln1g.md 'Medallion.Threading.IDistributedLock.TryAcquire(System.TimeSpan,System.Threading.CancellationToken)') semantics are used with a zero-length timeout. | +| [UseTransaction(bool)](SqlConnectionOptionsBuilder.UseTransaction.TqcdtREm34ssKiEMMEofaA.md 'Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder.UseTransaction(bool)') | Whether the synchronization should use a transaction scope rather than a session scope. Defaults to false. Synchronizing based on a transaction is marginally less expensive than using a connection because releasing requires only disposing the underlying [System.Data.IDbTransaction](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction 'System.Data.IDbTransaction'). The disadvantage is that using this strategy may lead to long-running transactions, which can be problematic for databases using the full recovery model. | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md index 09b18bec..36aebbea 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md @@ -3,10 +3,10 @@ ## SqlDistributedLock(string, string, Action, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name'). - -The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. - +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name'). + +The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + Unless [exactName](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md index d9aa1a1d..ba04edac 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md @@ -3,11 +3,11 @@ ## SqlDistributedLock(string, IDbConnection, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name'). - -The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and -will not be opened or closed. - +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + Unless [exactName](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md index ca6e5040..3f28cced 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md @@ -3,11 +3,11 @@ ## SqlDistributedLock(string, IDbTransaction, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name'). - -The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and -will not be committed or rolled back. - +Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name'). + +The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be committed or rolled back. + Unless [exactName](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md index 53fa953f..5d7eab8c 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.Acquire.zbspE3pGxl+PD2ikaBjjHQ.md @@ -3,14 +3,14 @@ ## SqlDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md index 9b9df07a..1810c62c 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.AcquireAsync.H4cG/yzFNt8CX+DvrGY7Ew.md @@ -3,14 +3,14 @@ ## SqlDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md index b45da7b4..6f167f98 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquire.+75ri4YlUSx+YHiFkRqGYA.md @@ -3,14 +3,14 @@ ## SqlDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md index e6e3a189..d2c07cb6 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.TryAcquireAsync.uIPf8DVSTmuiby/hHjaF2Q.md @@ -3,14 +3,14 @@ ## SqlDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md index 35df135f..eecbcb29 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedLock.md @@ -3,7 +3,7 @@ ## SqlDistributedLock Class -Implements a distributed lock using a SQL server application lock +Implements a distributed lock using a SQL server application lock (see https://msdn.microsoft.com/en-us/library/ms189823.aspx) ```csharp @@ -17,9 +17,9 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [SqlDistributedLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name').

The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | -| [SqlDistributedLock(string, IDbConnection, bool)](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | -| [SqlDistributedLock(string, IDbTransaction, bool)](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name').

The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be committed or rolled back.

Unless [exactName](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name'). The provided [connectionString](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. Unless [exactName](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedLock..ctor.IXLn8ksHwo3nLgCG5b0COA.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedLock(string, IDbConnection, bool)](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name'). The provided [connection](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and will not be opened or closed. Unless [exactName](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedLock..ctor.OZ2lCJsURZ+h8HKzPvymjw.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedLock(string, IDbTransaction, bool)](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name'). The provided [transaction](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and will not be committed or rolled back. Unless [exactName](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedLock..ctor.fV1bw9iga5pQQYPMV/GL1w.md#Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedLock.SqlDistributedLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md index fa3ab475..f3ed8d1f 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md @@ -3,11 +3,11 @@ ## SqlDistributedReaderWriterLock(string, IDbTransaction, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name'). - -The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and -will not be committed or rolled back. - +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name'). + +The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be committed or rolled back. + Unless [exactName](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md index 722d9099..9bc92132 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md @@ -3,11 +3,11 @@ ## SqlDistributedReaderWriterLock(string, IDbConnection, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). - -The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and -will not be opened or closed. - +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). + +The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and +will not be opened or closed. + Unless [exactName](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md index 3bf05eea..7e4bfef1 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md @@ -3,10 +3,10 @@ ## SqlDistributedReaderWriterLock(string, string, Action, bool) Constructor -Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name'). - -The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. - +Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name'). + +The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. + Unless [exactName](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md index 58d8c2af..f51f09b1 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireReadLock(Nullable, CancellationToken) Method -Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (myLock.AcquireReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (myLock.AcquireReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md index 0c3f670e..18e86815 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireReadLockAsync.frJQMqQ08BVx5q1tgkQxjQ.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md index 51849f22..a8cb0aff 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(Nullable, CancellationToken) Method -Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (myLock.AcquireUpgradeableReadLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (myLock.AcquireUpgradeableReadLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md index 846e71dc..451abb95 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync.m/YUdo7XWAgnG1T4s0f5Vw.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireUpgradeableReadLockAsync(Nullable, CancellationToken) Method -Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireUpgradeableReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires an UPGRADE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireUpgradeableReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md index 32208f77..0d677176 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireWriteLock(Nullable, CancellationToken) Method -Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (myLock.AcquireWriteLock(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (myLock.AcquireWriteLock(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md index dea74559..3a9cef77 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.AcquireWriteLockAsync.am3WXoiXExWu7PDcFrcbHg.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md index db90a0d4..511f1bc0 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLock.UqHJCSMD9c66tSl6eX0L5w.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock synchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md index 74bca304..48ef23c1 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireReadLockAsync.sG3MIB9MAtPJdHFbnV2eSw.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md index f2451a03..d5c2ec5a 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock.+0DGM6PoyEWIi1vW2vuGTg.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLock(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock synchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireUpgradeableReadLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md index 62c3f4db..f6e77031 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync.cFH9Wic6iC3c0NhaQB0+3A.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireUpgradeableReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire an UPGRADE lock asynchronously. Not compatible with another UPGRADE lock or a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireUpgradeableReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md index 6f175b19..06785ebb 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLock.ZWd9ONo8vWJyVmWMPBHRtg.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireWriteLock(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -using (var handle = myLock.TryAcquireWriteLock(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock synchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +using (var handle = myLock.TryAcquireWriteLock(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md index 52a6e46d..b5b15cb4 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync.PXBAXD3VfrmbmNfR4TNxfg.md @@ -3,14 +3,14 @@ ## SqlDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md index 6590baee..0d859d77 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedReaderWriterLock.md @@ -3,12 +3,12 @@ ## SqlDistributedReaderWriterLock Class -Implements reader-writer lock semantics using a SQL server application lock -(see https://msdn.microsoft.com/en-us/library/ms189823.aspx). - -This class supports the following patterns: -* Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)')) -* Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)')) +Implements reader-writer lock semantics using a SQL server application lock +(see https://msdn.microsoft.com/en-us/library/ms189823.aspx). + +This class supports the following patterns: +* Multiple readers AND single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)')) +* Multiple readers OR single writer (using [AcquireReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireReadLock.VL35b6pTj/jUeLkzFiukmQ.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireReadLock(System.Nullable, System.Threading.CancellationToken)') and [AcquireWriteLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireWriteLock.EU9XGhm/TaMbin4RU73eiA.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireWriteLock(System.Nullable, System.Threading.CancellationToken)')) * Upgradeable read locks similar to [System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock 'System.Threading.ReaderWriterLockSlim.EnterUpgradeableReadLock') (using [AcquireUpgradeableReadLock(Nullable<TimeSpan>, CancellationToken)](SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock.FQQa8Ne3Ve3DCYUMPEnBDg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.AcquireUpgradeableReadLock(System.Nullable, System.Threading.CancellationToken)') and [UpgradeToWriteLock(Nullable<TimeSpan>, CancellationToken)](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockUpgradeableHandle.UpgradeToWriteLock.Tz7MsKLra+HymbjqGwuzRQ.md 'Medallion.Threading.IDistributedLockUpgradeableHandle.UpgradeToWriteLock(System.Nullable{System.TimeSpan},System.Threading.CancellationToken)')) ```csharp @@ -23,9 +23,9 @@ Implements [IDistributedUpgradeableReaderWriterLock](https://github.com/madelson | Constructors | | | :--- | :--- | -| [SqlDistributedReaderWriterLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name').

The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | -| [SqlDistributedReaderWriterLock(string, IDbConnection, bool)](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name').

The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be opened or closed.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | -| [SqlDistributedReaderWriterLock(string, IDbTransaction, bool)](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name').

The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and
will not be committed or rolled back.

Unless [exactName](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedReaderWriterLock(string, string, Action<SqlConnectionOptionsBuilder>, bool)](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name'). The provided [connectionString](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).connectionString 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).connectionString') will be used to connect to the database. Unless [exactName](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.t7dQ4a6u8pWRU7S46Bev2w.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, string, System.Action, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedReaderWriterLock(string, IDbConnection, bool)](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name'). The provided [connection](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).connection 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).connection') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and will not be opened or closed. Unless [exactName](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.aQ4wmiPxon1R/D2jE25+dg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbConnection,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbConnection, bool).name') will be escaped/hashed to ensure name validity. | +| [SqlDistributedReaderWriterLock(string, IDbTransaction, bool)](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool)') | Constructs a new lock using the provided [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name'). The provided [transaction](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).transaction 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).transaction') will be used to connect to the database and will provide lock scope. It is assumed to be externally managed and will not be committed or rolled back. Unless [exactName](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).exactName') is specified, [name](SqlDistributedReaderWriterLock..ctor.V/fj2Yk0d/CnC3hDs1y3Cg.md#Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string,System.Data.IDbTransaction,bool).name 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock.SqlDistributedReaderWriterLock(string, System.Data.IDbTransaction, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md index 10bb1e90..174289b6 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md @@ -3,9 +3,9 @@ ## SqlDistributedSemaphore(string, int, IDbConnection) Constructor -Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount') -times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection'). -The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount') +times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection'). +The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, or dispose it ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md index 70f2a845..013ee430 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md @@ -3,9 +3,9 @@ ## SqlDistributedSemaphore(string, int, IDbTransaction) Constructor -Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount') -times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction'). -The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed: +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount') +times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction'). +The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, commit, roll back, or dispose them ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md index 54ea9599..05b9f661 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md @@ -3,7 +3,7 @@ ## SqlDistributedSemaphore(string, int, string, Action) Constructor -Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount') +Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount') times concurrently. The provided [connectionString](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).connectionString') will be used to connect to the database. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md index 45f88a0a..93ade7a9 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.Acquire.4HnR2Q10n/AB5PR0OVZDpw.md @@ -3,14 +3,14 @@ ## SqlDistributedSemaphore.Acquire(Nullable, CancellationToken) Method -Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (mySemaphore.Acquire(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md index 6549f121..b6b7c6b5 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.AcquireAsync.0jaVdGSo+de/zoZcbd0xQw.md @@ -3,14 +3,14 @@ ## SqlDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method -Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await mySemaphore.AcquireAsync(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md index 8b6caef7..4dbbbe60 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquire.3L6fL8XbcwjI2MLrAh55tw.md @@ -3,14 +3,14 @@ ## SqlDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket synchronously. Usage: - -```csharp -using (var handle = mySemaphore.TryAcquire(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md index 238f6060..fa8b1c04 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.TryAcquireAsync.IRSRwL6SUQA/rW6ewYOdNw.md @@ -3,14 +3,14 @@ ## SqlDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket asynchronously. Usage: - -```csharp -await using (var handle = await mySemaphore.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md index e4678045..a227c7d4 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSemaphore.md @@ -16,9 +16,9 @@ Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/t | Constructors | | | :--- | :--- | -| [SqlDistributedSemaphore(string, int, string, Action<SqlConnectionOptionsBuilder>)](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount')
times concurrently. The provided [connectionString](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).connectionString') will be used to connect to the database. | -| [SqlDistributedSemaphore(string, int, IDbConnection)](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount')
times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection').
The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will
not attempt to open, close, or dispose it | -| [SqlDistributedSemaphore(string, int, IDbTransaction)](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount')
times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction').
The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed:
the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, commit, roll back, or dispose them | +| [SqlDistributedSemaphore(string, int, string, Action<SqlConnectionOptionsBuilder>)](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).maxCount') times concurrently. The provided [connectionString](SqlDistributedSemaphore..ctor.s6/ahDpIg3est068m3+NgA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.SqlServer.SqlConnectionOptionsBuilder_).connectionString 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, string, System.Action).connectionString') will be used to connect to the database. | +| [SqlDistributedSemaphore(string, int, IDbConnection)](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).maxCount') times concurrently. When acquired, the semaphore will be scoped to the given [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection'). The [connection](SqlDistributedSemaphore..ctor.BXWZBo51Xli5HcVudj4PPQ.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbConnection).connection 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbConnection).connection') is assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, or dispose it | +| [SqlDistributedSemaphore(string, int, IDbTransaction)](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction)') | Creates a semaphore with name [name](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).name 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).name') that can be acquired up to [maxCount](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).maxCount') times concurrently. When acquired, the semaphore will be scoped to the given [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction'). The [transaction](SqlDistributedSemaphore..ctor.h/TmHEv8QIhpjqtxBSqudA.md#Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string,int,System.Data.IDbTransaction).transaction 'Medallion.Threading.SqlServer.SqlDistributedSemaphore.SqlDistributedSemaphore(string, int, System.Data.IDbTransaction).transaction') and its [System.Data.IDbTransaction.Connection](https://docs.microsoft.com/en-us/dotnet/api/System.Data.IDbTransaction.Connection 'System.Data.IDbTransaction.Connection') are assumed to be externally managed: the [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') will not attempt to open, close, commit, roll back, or dispose them | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md index 21563f0d..beedc4ce 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md @@ -3,7 +3,7 @@ ## SqlDistributedSynchronizationProvider.CreateLock(string, bool) Method -Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') +Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid applock names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md index 2757780b..2d5f5a6e 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.CreateReaderWriterLock/sU0nmoSgVAlSEihYgHv9Q.md @@ -3,7 +3,7 @@ ## SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool) Method -Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') +Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') is specified, invalid applock names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md index ef2dfd59..6de15734 100644 --- a/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.SqlServer/SqlDistributedSynchronizationProvider.md @@ -3,8 +3,8 @@ ## SqlDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'), -[IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'), +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock'), +[IDistributedUpgradeableReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedUpgradeableReaderWriterLockProvider.md 'Medallion.Threading.IDistributedUpgradeableReaderWriterLockProvider') for [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore'). ```csharp @@ -27,6 +27,6 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Methods | | | :--- | :--- | -| [CreateLock(string, bool)](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName')
is specified, invalid applock names will be escaped/hashed. | -| [CreateReaderWriterLock(string, bool)](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName')
is specified, invalid applock names will be escaped/hashed. | +| [CreateLock(string, bool)](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool)') | Constructs an instance of [SqlDistributedLock](SqlDistributedLock.md 'Medallion.Threading.SqlServer.SqlDistributedLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateLock.OBB/tAHXb7DSNADefkuRKg.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid applock names will be escaped/hashed. | +| [CreateReaderWriterLock(string, bool)](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool)') | Constructs an instance of [SqlDistributedReaderWriterLock](SqlDistributedReaderWriterLock.md 'Medallion.Threading.SqlServer.SqlDistributedReaderWriterLock') with the provided [name](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).name'). Unless [exactName](SqlDistributedSynchronizationProvider.CreateReaderWriterLock./sU0nmoSgVAlSEihYgHv9Q.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string,bool).exactName 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateReaderWriterLock(string, bool).exactName') is specified, invalid applock names will be escaped/hashed. | | [CreateSemaphore(string, int)](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int)') | Constructs an instance of [SqlDistributedSemaphore](SqlDistributedSemaphore.md 'Medallion.Threading.SqlServer.SqlDistributedSemaphore') with the provided [name](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).name 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).name') and [maxCount](SqlDistributedSynchronizationProvider.CreateSemaphore.NU06amMuOL4wYpDoFLZ7sA.md#Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string,int).maxCount 'Medallion.Threading.SqlServer.SqlDistributedSynchronizationProvider.CreateSemaphore(string, int).maxCount'). | diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md index 0213c265..54d6a7a8 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md @@ -3,11 +3,11 @@ ## EventWaitHandleDistributedLock(string, Nullable, bool) Constructor -Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). - -[abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by -its original owner. The default is 2s. - +Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). + +[abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by +its original owner. The default is 2s. + Unless [exactName](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md index 793f94a9..fa59738f 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.Acquire.csc50wjfYFMfhVMh9f0p5g.md @@ -3,14 +3,14 @@ ## EventWaitHandleDistributedLock.Acquire(Nullable, CancellationToken) Method -Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (myLock.Acquire(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (myLock.Acquire(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md index d05052cc..5dc8171c 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.AcquireAsync.Q/XRVgkI/77ehHSwgz3+6g.md @@ -3,14 +3,14 @@ ## EventWaitHandleDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md index 7746d858..f7a2f31c 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquire.uJMovE7EIAyUhcQlWkoiMg.md @@ -3,14 +3,14 @@ ## EventWaitHandleDistributedLock.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire the lock synchronously. Usage: - -```csharp -using (var handle = myLock.TryAcquire(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock synchronously. Usage: + +```csharp +using (var handle = myLock.TryAcquire(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md index 5dffe346..dbe76f6b 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.TryAcquireAsync.bF7Wpky/IL0puVDTMR7U2w.md @@ -3,14 +3,14 @@ ## EventWaitHandleDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md index 78295dae..ce3b5ae8 100644 --- a/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md +++ b/docs/api/DistributedLock.WaitHandles/EventWaitHandleDistributedLock.md @@ -16,7 +16,7 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [EventWaitHandleDistributedLock(string, Nullable<TimeSpan>, bool)](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool)') | Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name').

[abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | +| [EventWaitHandleDistributedLock(string, Nullable<TimeSpan>, bool)](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool)') | Constructs a lock with the given [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name'). [abandonmentCheckCadence](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.EventWaitHandle](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.EventWaitHandle 'System.Threading.EventWaitHandle') object in case it is abandoned by its original owner. The default is 2s. Unless [exactName](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).exactName') is specified, [name](EventWaitHandleDistributedLock..ctor.2Tva732RJcbYY7yOGc2Dtg.md#Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock.EventWaitHandleDistributedLock(string, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md b/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md index 1baec3b3..e2b5318b 100644 --- a/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md +++ b/docs/api/DistributedLock.WaitHandles/Medallion.Threading.WaitHandles.md @@ -8,4 +8,4 @@ | [EventWaitHandleDistributedLockHandle](EventWaitHandleDistributedLockHandle.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') | Implements a distributed semaphore based on a global [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') | | [WaitHandleDistributedSemaphoreHandle](WaitHandleDistributedSemaphoreHandle.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | -| [WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock')
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). | +| [WaitHandleDistributedSynchronizationProvider](WaitHandleDistributedSynchronizationProvider.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). | diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md index c6e56d96..200589c2 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md @@ -3,11 +3,11 @@ ## WaitHandleDistributedSemaphore(string, int, Nullable, bool) Constructor -Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). - -[abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by -its original owner. The default is 2s. - +Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). + +[abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by +its original owner. The default is 2s. + Unless [exactName](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md index bfef08c4..83276ebd 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.Acquire.fanbWVO3U0ELSV89GyikgQ.md @@ -3,14 +3,14 @@ ## WaitHandleDistributedSemaphore.Acquire(Nullable, CancellationToken) Method -Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -using (mySemaphore.Acquire(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket synchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +using (mySemaphore.Acquire(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md index a9b83865..33cb3c90 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.AcquireAsync.k9Mv6k/1m4DGGHNWVI0rSw.md @@ -3,14 +3,14 @@ ## WaitHandleDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method -Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await mySemaphore.AcquireAsync(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md index e882a193..a856415b 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquire.xAXKRX1HdsJVylWBC/+WmA.md @@ -3,14 +3,14 @@ ## WaitHandleDistributedSemaphore.TryAcquire(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket synchronously. Usage: - -```csharp -using (var handle = mySemaphore.TryAcquire(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket synchronously. Usage: + +```csharp +using (var handle = mySemaphore.TryAcquire(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md index 32542c17..8731efad 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.TryAcquireAsync.nk6f9CuMtAPqAG7F0UWvSA.md @@ -3,14 +3,14 @@ ## WaitHandleDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket asynchronously. Usage: - -```csharp -await using (var handle = await mySemaphore.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md index 2add86f9..bceee291 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSemaphore.md @@ -16,7 +16,7 @@ Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/t | Constructors | | | :--- | :--- | -| [WaitHandleDistributedSemaphore(string, int, Nullable<TimeSpan>, bool)](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool)') | Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name').

[abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by
its original owner. The default is 2s.

Unless [exactName](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | +| [WaitHandleDistributedSemaphore(string, int, Nullable<TimeSpan>, bool)](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool)') | Constructs a lock with the given [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name'). [abandonmentCheckCadence](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).abandonmentCheckCadence 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).abandonmentCheckCadence') specifies how frequently we refresh our [System.Threading.Semaphore](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Semaphore 'System.Threading.Semaphore') object in case it is abandoned by its original owner. The default is 2s. Unless [exactName](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).exactName') is specified, [name](WaitHandleDistributedSemaphore..ctor.4ysEtsHFYQ8UNvnVKspCjg.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string,int,System.Nullable_System.TimeSpan_,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore.WaitHandleDistributedSemaphore(string, int, System.Nullable, bool).name') will be escaped/hashed to ensure name validity. | | Properties | | | :--- | :--- | diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md index 38e6338e..1616af4f 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md @@ -3,7 +3,7 @@ ## WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool) Method -Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless +Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md index 43a0f116..cea59a13 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md @@ -3,8 +3,8 @@ ## WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool) Method -Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') -and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait +Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') +and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. ```csharp diff --git a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md index dfff3eb8..0b9a9b48 100644 --- a/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.WaitHandles/WaitHandleDistributedSynchronizationProvider.md @@ -3,7 +3,7 @@ ## WaitHandleDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore'). ```csharp @@ -22,5 +22,5 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Methods | | | :--- | :--- | -| [CreateLock(string, bool)](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless
[exactName](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | -| [CreateSemaphore(string, int, bool)](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool)') | Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name')
and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait
handle names will be escaped/hashed. | +| [CreateLock(string, bool)](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool)') | Creates a [EventWaitHandleDistributedLock](EventWaitHandleDistributedLock.md 'Medallion.Threading.WaitHandles.EventWaitHandleDistributedLock') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).name'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateLock.+f5b/NJBO/BPj27n2I4gbA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateLock(string, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | +| [CreateSemaphore(string, int, bool)](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool)') | Creates a [WaitHandleDistributedSemaphore](WaitHandleDistributedSemaphore.md 'Medallion.Threading.WaitHandles.WaitHandleDistributedSemaphore') with the given [name](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).name 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).name') and [maxCount](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).maxCount 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).maxCount'). Unless [exactName](WaitHandleDistributedSynchronizationProvider.CreateSemaphore.lScE6Nm5quO4w5D+oiHGrA.md#Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string,int,bool).exactName 'Medallion.Threading.WaitHandles.WaitHandleDistributedSynchronizationProvider.CreateSemaphore(string, int, bool).exactName') is specified, invalid wait handle names will be escaped/hashed. | diff --git a/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md b/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md index a10fed32..0ca28c50 100644 --- a/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md +++ b/docs/api/DistributedLock.ZooKeeper/Medallion.Threading.ZooKeeper.md @@ -4,15 +4,15 @@ | Classes | | | :--- | :--- | -| [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') | An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in
https://zookeeper.apache.org/doc/r3.1.2/recipes.html | +| [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock') | An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in https://zookeeper.apache.org/doc/r3.1.2/recipes.html | | [ZooKeeperDistributedLockHandle](ZooKeeperDistributedLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock') | A distributed reader-writer lock based on the ZooKeeper shared lock recipe (https://zookeeper.apache.org/doc/current/recipes.html). | | [ZooKeeperDistributedReaderWriterLockHandle](ZooKeeperDistributedReaderWriterLockHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLockHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore') | An implementation of [IDistributedSemaphore](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.md 'Medallion.Threading.IDistributedSemaphore') based on ZooKeeper. Uses an approach similar to [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'). | | [ZooKeeperDistributedSemaphoreHandle](ZooKeeperDistributedSemaphoreHandle.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphoreHandle') | Implements [IDistributedSynchronizationHandle](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSynchronizationHandle.md 'Medallion.Threading.IDistributedSynchronizationHandle') | | [ZooKeeperDistributedSynchronizationOptionsBuilder](ZooKeeperDistributedSynchronizationOptionsBuilder.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder') | Options for configuring ZooKeeper-based synchronization primitives | -| [ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'),
[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'),
and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore'). | +| [ZooKeeperDistributedSynchronizationProvider](ZooKeeperDistributedSynchronizationProvider.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider') | Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'), [IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore'). | | Structs | | | :--- | :--- | -| [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') | Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path.
Call [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') to get the path value. | +| [ZooKeeperPath](ZooKeeperPath.md 'Medallion.Threading.ZooKeeper.ZooKeeperPath') | Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path. Call [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') to get the path value. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md index be4d0fe7..b8d8b944 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedLock(ZooKeeperPath, string, bool, Action) Constructor -Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). - -If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md index d7ae088a..853b8afd 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedLock(string, string, Action) Constructor -Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options'). - -The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options'). + +The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md index e5253052..84914855 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedLock(ZooKeeperPath, string, string, Action) Constructor -Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). - -The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). + +The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md index e8494411..3c338590 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.AcquireAsync.dX8Tx1oYTmer5I2nEBAsSA.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedLock.AcquireAsync(Nullable, CancellationToken) Method -Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await myLock.AcquireAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires the lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await myLock.AcquireAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md index 4d1037d6..23d5c01c 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name Property -Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md index 8512b451..f1812655 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.TryAcquireAsync.dE6fPlJgcH/Osz5FH2DXIg.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedLock.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire the lock asynchronously. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire the lock asynchronously. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md index 7d8f7510..3a08353b 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedLock.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedLock Class -An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in +An implementation of [IDistributedLock](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.md 'Medallion.Threading.IDistributedLock') based on ZooKeeper. Uses the lock recipe described in https://zookeeper.apache.org/doc/r3.1.2/recipes.html ```csharp @@ -17,9 +17,9 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Constructors | | | :--- | :--- | -| [ZooKeeperDistributedLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | -| [ZooKeeperDistributedLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options').

The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | -| [ZooKeeperDistributedLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options').

The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). If [assumePathExists](ZooKeeperDistributedLock..ctor.T8t39/JnVaogxN4UVbbBww.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). | +| [ZooKeeperDistributedLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedLock..ctor.oGOX/TLwd8GsE6eSegfTOg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | +| [ZooKeeperDistributedLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).options'). The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedLock..ctor.YD0f/J7K06jJzbPO75s7Pg.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.ZooKeeperDistributedLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | | Properties | | | :--- | :--- | @@ -32,4 +32,4 @@ Implements [IDistributedLock](https://github.com/madelson/DistributedLock/tree/d | Explicit Interface Implementations | | | :--- | :--- | -| [Medallion.Threading.IDistributedLock.Name](ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | +| [Medallion.Threading.IDistributedLock.Name](ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock.Medallion.Threading.IDistributedLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLock.Name.md 'Medallion.Threading.IDistributedLock.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md index f67a14d5..50803513 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, string, Action) Constructor -Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). - -The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). + +The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md index 16f2bbd6..5e0120ef 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, bool, Action) Constructor -Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). - -If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md index 40264875..4ab6e9b5 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedReaderWriterLock(string, string, Action) Constructor -Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options'). - -The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options'). + +The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md index e12ebdbe..a3d81184 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync.CZZdkDZUKDMC66TavV6oKQ.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedReaderWriterLock.AcquireReadLockAsync(Nullable, CancellationToken) Method -Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (await myLock.AcquireReadLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a READ lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (await myLock.AcquireReadLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md index 5cded601..e73297d6 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync.C0NA4I3hjc7zPn4ctLMeLg.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedReaderWriterLock.AcquireWriteLockAsync(Nullable, CancellationToken) Method -Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (await myLock.AcquireWriteLockAsync(...)) -{ - /* we have the lock! */ -} -// dispose releases the lock +Acquires a WRITE lock asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (await myLock.AcquireWriteLockAsync(...)) +{ + /* we have the lock! */ +} +// dispose releases the lock ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md index dfee8655..b04bc81c 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name Property -Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md index 1bbbe50c..fd067bdd 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync.rS7MPpWE2xY2RE8T3qxudw.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedReaderWriterLock.TryAcquireReadLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireReadLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a READ lock asynchronously. Multiple readers are allowed. Not compatible with a WRITE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireReadLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md index c0510329..eda088d0 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync.91WGFH9dXQfYepWYj84Epg.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedReaderWriterLock.TryAcquireWriteLockAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: - -```csharp -await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) -{ - if (handle != null) { /* we have the lock! */ } -} -// dispose releases the lock if we took it +Attempts to acquire a WRITE lock asynchronously. Not compatible with another WRITE lock or an UPGRADE lock. Usage: + +```csharp +await using (var handle = await myLock.TryAcquireWriteLockAsync(...)) +{ + if (handle != null) { /* we have the lock! */ } +} +// dispose releases the lock if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md index d9b8b24c..91fadbe9 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedReaderWriterLock.md @@ -16,9 +16,9 @@ Implements [IDistributedReaderWriterLock](https://github.com/madelson/Distribute | Constructors | | | :--- | :--- | -| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | -| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options').

The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | -| [ZooKeeperDistributedReaderWriterLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options').

The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action)') | Constructs a new lock based on the provided [path](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).options'). If [assumePathExists](ZooKeeperDistributedReaderWriterLock..ctor.GPpUchrSAGRP7iRQsT+Qvw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). | +| [ZooKeeperDistributedReaderWriterLock(ZooKeeperPath, string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action)') | Constructs a new lock based on the provided [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'), [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).options'). The lock's path will be a parent node of [directoryPath](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedReaderWriterLock..ctor.AXhGVqfGNT1g+R+FvctbsQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | +| [ZooKeeperDistributedReaderWriterLock(string, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action)') | Constructs a new lock based on the provided [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name'), [connectionString](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).connectionString'), and [options](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).options'). The lock's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedReaderWriterLock..ctor.UBffuya5D0MaaTKQLo9/wQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.ZooKeeperDistributedReaderWriterLock(string, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | | Properties | | | :--- | :--- | @@ -33,4 +33,4 @@ Implements [IDistributedReaderWriterLock](https://github.com/madelson/Distribute | Explicit Interface Implementations | | | :--- | :--- | -| [Medallion.Threading.IDistributedReaderWriterLock.Name](ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | +| [Medallion.Threading.IDistributedReaderWriterLock.Name](ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock.Medallion.Threading.IDistributedReaderWriterLock.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLock.Name.md 'Medallion.Threading.IDistributedReaderWriterLock.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md index 2f494b2c..2e646468 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedSemaphore(ZooKeeperPath, int, string, bool, Action) Constructor -Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options'). - -If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be +Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options'). + +If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md index fdc93e17..3a16c255 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedSemaphore(ZooKeeperPath, string, int, string, Action) Constructor -Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options'). - -The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options'). + +The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md index 06fbb485..b5f1f8d8 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedSemaphore(string, int, string, Action) Constructor -Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options'). - -The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure +Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options'). + +The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md index 950565af..c24226ce 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.AcquireAsync.FRq4bLc63K5HTCCEHhCigg.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedSemaphore.AcquireAsync(Nullable, CancellationToken) Method -Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: - -```csharp -await using (await mySemaphore.AcquireAsync(...)) -{ - /* we have the ticket! */ -} -// dispose releases the ticket +Acquires a semaphore ticket asynchronously, failing with [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException') if the attempt times out. Usage: + +```csharp +await using (await mySemaphore.AcquireAsync(...)) +{ + /* we have the ticket! */ +} +// dispose releases the ticket ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md index aad3ffee..702dff98 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name Property -Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact +Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md index d14abd55..298fc53f 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.TryAcquireAsync.9Sm3yQ3LE3ZAN2gEjF09kA.md @@ -3,14 +3,14 @@ ## ZooKeeperDistributedSemaphore.TryAcquireAsync(TimeSpan, CancellationToken) Method -Attempts to acquire a semaphore ticket asynchronously. Usage: - -```csharp -await using (var handle = await mySemaphore.TryAcquireAsync(...)) -{ - if (handle != null) { /* we have the ticket! */ } -} -// dispose releases the ticket if we took it +Attempts to acquire a semaphore ticket asynchronously. Usage: + +```csharp +await using (var handle = await mySemaphore.TryAcquireAsync(...)) +{ + if (handle != null) { /* we have the ticket! */ } +} +// dispose releases the ticket if we took it ``` ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md index d6611673..e96a0388 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSemaphore.md @@ -16,9 +16,9 @@ Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/t | Constructors | | | :--- | :--- | -| [ZooKeeperDistributedSemaphore(ZooKeeperPath, int, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action)') | Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options').

If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be
deleted after releasing (defaults to false). | -| [ZooKeeperDistributedSemaphore(ZooKeeperPath, string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action)') | Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options').

The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | -| [ZooKeeperDistributedSemaphore(string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action)') | Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options').

The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure
validity. | +| [ZooKeeperDistributedSemaphore(ZooKeeperPath, int, string, bool, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action)') | Constructs a new semaphore based on the provided [path](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).path 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).path'), [connectionString](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).options'). If [assumePathExists](ZooKeeperDistributedSemaphore..ctor.Ceq6ePeXhFqMiSyLs3JHqQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,int,string,bool,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).assumePathExists 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, int, string, bool, System.Action).assumePathExists') is specified, then the node will not be created as part of acquiring nor will it be deleted after releasing (defaults to false). | +| [ZooKeeperDistributedSemaphore(ZooKeeperPath, string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action)') | Constructs a new semaphore based on the provided [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'), [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).options'). The semaphore's path will be a parent node of [directoryPath](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).directoryPath'). If [name](ZooKeeperDistributedSemaphore..ctor.NXXFG0kJwyz4rwDbslWqzw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | +| [ZooKeeperDistributedSemaphore(string, int, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action)') | Constructs a new semaphore based on the provided [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name'), [connectionString](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).connectionString'), and [options](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).options'). The semaphore's path will be a parent node of the root directory '/'. If [name](ZooKeeperDistributedSemaphore..ctor.ceNJY9cjGCQ/TgjjnsQT9A.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string,int,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).name 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.ZooKeeperDistributedSemaphore(string, int, string, System.Action).name') is not a valid node name, it will be transformed to ensure validity. | | Properties | | | :--- | :--- | @@ -32,4 +32,4 @@ Implements [IDistributedSemaphore](https://github.com/madelson/DistributedLock/t | Explicit Interface Implementations | | | :--- | :--- | -| [Medallion.Threading.IDistributedSemaphore.Name](ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact
that this will include the leading "/" and base directory alongside the passed-in name. | +| [Medallion.Threading.IDistributedSemaphore.Name](ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore.Medallion.Threading.IDistributedSemaphore.Name') | Implements [Name](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphore.Name.md 'Medallion.Threading.IDistributedSemaphore.Name'). Implemented explicitly to avoid confusion with the fact that this will include the leading "/" and base directory alongside the passed-in name. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md index fdd24b91..a0d74dae 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md @@ -3,9 +3,9 @@ ## ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl(string, string, int) Method -Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control -list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs. - +Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control +list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs. + If no ACL entries are specified, the ACL used will be a singleton list that grants all permissions to (world, anyone). ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md index 00b1a2dd..b215fac4 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md @@ -3,10 +3,10 @@ ## ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo(string, IReadOnlyList) Method -Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call -to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more -information on ZooKeeper auth. - +Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call +to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more +information on ZooKeeper auth. + By default, no auth info is added. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md index 82bb6b16..e35cc243 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md @@ -3,8 +3,8 @@ ## ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout(TimeSpan) Method -Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException'). - +Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException'). + Defaults to 15s. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md index 02669eea..b6dd2fe9 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md @@ -3,10 +3,10 @@ ## ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(TimeSpan) Method -Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews -the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash -of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock. - +Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews +the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash +of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock. + Defaults to 20s. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md index fd19ef72..cdbdb415 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationOptionsBuilder.md @@ -13,7 +13,7 @@ Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.O | Methods | | | :--- | :--- | -| [AddAccessControl(string, string, int)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl(string, string, int)') | Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control
list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs.

If no ACL entries are specified, the ACL used will be a singleton list that grants all permissions to (world, anyone). | -| [AddAuthInfo(string, IReadOnlyList<byte>)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo(string, System.Collections.Generic.IReadOnlyList)') | Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call
to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more
information on ZooKeeper auth.

By default, no auth info is added. | -| [ConnectTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout(System.TimeSpan)') | Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException').

Defaults to 15s. | -| [SessionTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan)') | Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews
the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash
of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock.

Defaults to 20s. | +| [AddAccessControl(string, string, int)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl.tEJOZTy+rziKjj9R59jrIQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAccessControl(string, string, int)') | Configures the access control list (ACL) for any created ZooKeeper nodes. Each call to this method adds another entry to the access control list. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper ACLs. If no ACL entries are specified, the ACL used will be a singleton list that grants all permissions to (world, anyone). | +| [AddAuthInfo(string, IReadOnlyList<byte>)](ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo.JC63oXMe1MWcEJ2k3bfJ0g.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.AddAuthInfo(string, System.Collections.Generic.IReadOnlyList)') | Specifies authentication info to be added to the Zookeeper connection with [org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])](https://docs.microsoft.com/en-us/dotnet/api/org.apache.zookeeper.ZooKeeper.addAuthInfo#org_apache_zookeeper_ZooKeeper_addAuthInfo_System_String,System_Byte[]_ 'org.apache.zookeeper.ZooKeeper.addAuthInfo(System.String,System.Byte[])'). Each call to this method adds another entry to the list of auth info. See https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html for more information on ZooKeeper auth. By default, no auth info is added. | +| [ConnectTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout.I/ihabf4bAq6D8+832gAKA.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.ConnectTimeout(System.TimeSpan)') | Configures how long to wait to establish a connection to ZooKeeper before failing with a [System.TimeoutException](https://docs.microsoft.com/en-us/dotnet/api/System.TimeoutException 'System.TimeoutException'). Defaults to 15s. | +| [SessionTimeout(TimeSpan)](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan)') | Configures the [sessionTimeout](ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout.a4s4suCBjQ12y3wfkImgaw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder.SessionTimeout(System.TimeSpan).sessionTimeout') for connections to ZooKeeper. Because the underlying ZooKeeper client periodically renews the session, this value generally will not impact behavior. Lower values mean that locks will be released more quickly following a crash of the lock-holding process, but also increase the risk that transient connection issues will result in a dropped lock. Defaults to 20s. | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md index 74527245..71b45537 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedSynchronizationProvider(ZooKeeperPath, string, Action) Constructor -Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created +Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created in [directoryPath](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).directoryPath'). ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md index b6820017..a8f64667 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md @@ -3,7 +3,7 @@ ## ZooKeeperDistributedSynchronizationProvider(string, Action) Constructor -Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created +Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created in the root directory '/'. ```csharp diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md index f9a605dc..3cb6b372 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperDistributedSynchronizationProvider.md @@ -3,8 +3,8 @@ ## ZooKeeperDistributedSynchronizationProvider Class -Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'), -[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'), +Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedLockProvider.md 'Medallion.Threading.IDistributedLockProvider') for [ZooKeeperDistributedLock](ZooKeeperDistributedLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedLock'), +[IDistributedReaderWriterLockProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedReaderWriterLockProvider.md 'Medallion.Threading.IDistributedReaderWriterLockProvider') for [ZooKeeperDistributedReaderWriterLock](ZooKeeperDistributedReaderWriterLock.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedReaderWriterLock'), and [IDistributedSemaphoreProvider](https://github.com/madelson/DistributedLock/tree/default-documentation/docs/api/DistributedLock.Core/IDistributedSemaphoreProvider.md 'Medallion.Threading.IDistributedSemaphoreProvider') for [ZooKeeperDistributedSemaphore](ZooKeeperDistributedSemaphore.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSemaphore'). ```csharp @@ -20,8 +20,8 @@ Implements [IDistributedLockProvider](https://github.com/madelson/DistributedLoc | Constructors | | | :--- | :--- | -| [ZooKeeperDistributedSynchronizationProvider(ZooKeeperPath, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created
in [directoryPath](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).directoryPath'). | -| [ZooKeeperDistributedSynchronizationProvider(string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created
in the root directory '/'. | +| [ZooKeeperDistributedSynchronizationProvider(ZooKeeperPath, string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).options'). Lock and semaphore nodes will be created in [directoryPath](ZooKeeperDistributedSynchronizationProvider..ctor.cwicK93j0K7ho3vCLOhbSw.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath,string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).directoryPath 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(Medallion.Threading.ZooKeeper.ZooKeeperPath, string, System.Action).directoryPath'). | +| [ZooKeeperDistributedSynchronizationProvider(string, Action<ZooKeeperDistributedSynchronizationOptionsBuilder>)](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action)') | Constructs a provider which uses [connectionString](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).connectionString 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).connectionString') and [options](ZooKeeperDistributedSynchronizationProvider..ctor.vy3yiMkyxWODnX4fLuAvkQ.md#Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string,System.Action_Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationOptionsBuilder_).options 'Medallion.Threading.ZooKeeper.ZooKeeperDistributedSynchronizationProvider.ZooKeeperDistributedSynchronizationProvider(string, System.Action).options'). Lock and semaphore nodes will be created in the root directory '/'. | | Methods | | | :--- | :--- | diff --git a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md index e895f4e7..1f82a978 100644 --- a/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md +++ b/docs/api/DistributedLock.ZooKeeper/ZooKeeperPath.md @@ -3,7 +3,7 @@ ## ZooKeeperPath Struct -Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path. +Represents a path to a ZooKeeper node. The constructor validates that the input is a valid path. Call [ToString()](ZooKeeperPath.ToString().md 'Medallion.Threading.ZooKeeper.ZooKeeperPath.ToString()') to get the path value. ```csharp