Interface ILockingMechanism
Namespace: Umbraco.Cms.Core.Scoping
Assembly: Umbraco.Core.dll
Syntax
public interface ILockingMechanism
Methods
View SourceClearLocks(Guid)
Clears all the locks held
Declaration
void ClearLocks(Guid instanceId)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId |
EagerReadLock(Guid, Int32[])
Declaration
void EagerReadLock(Guid instanceId, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Int32[] | lockIds |
EagerReadLock(Guid, Nullable<TimeSpan>, Int32[])
Eagerly acquires a read-lock
Declaration
void EagerReadLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Nullable<TimeSpan> | timeout | Timeout for the lock |
System.Int32[] | lockIds |
EagerWriteLock(Guid, Int32[])
Declaration
void EagerWriteLock(Guid instanceId, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Int32[] | lockIds |
EagerWriteLock(Guid, Nullable<TimeSpan>, Int32[])
Eagerly acquires a write-lock
Declaration
void EagerWriteLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Nullable<TimeSpan> | timeout | Timeout for the lock |
System.Int32[] | lockIds |
EnsureLocks(Guid)
Acquires all the non-eagerly requested locks.
Declaration
void EnsureLocks(Guid scopeInstanceId)
Parameters
Type | Name | Description |
---|---|---|
Guid | scopeInstanceId |
EnsureLocksCleared(Guid)
Declaration
void EnsureLocksCleared(Guid instanceId)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId |
GetReadLocks()
Declaration
Dictionary<Guid, Dictionary<int, int>>? GetReadLocks()
Returns
Type | Description |
---|---|
System.Nullable<Umbraco.Cms.Core.Dictionary<Guid, Umbraco.Cms.Core.Dictionary<System.Int32, System.Int32>>> |
GetWriteLocks()
Declaration
Dictionary<Guid, Dictionary<int, int>>? GetWriteLocks()
Returns
Type | Description |
---|---|
System.Nullable<Umbraco.Cms.Core.Dictionary<Guid, Umbraco.Cms.Core.Dictionary<System.Int32, System.Int32>>> |
ReadLock(Guid, Int32[])
Declaration
void ReadLock(Guid instanceId, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Int32[] | lockIds |
ReadLock(Guid, Nullable<TimeSpan>, Int32[])
Read-locks some lock objects lazily.
Declaration
void ReadLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | Instance id of the scope who is requesting the lock |
System.Nullable<TimeSpan> | timeout | Timeout for the lock |
System.Int32[] | lockIds | Array of lock object identifiers. |
WriteLock(Guid, Int32[])
Declaration
void WriteLock(Guid instanceId, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | |
System.Int32[] | lockIds |
WriteLock(Guid, Nullable<TimeSpan>, Int32[])
Write-locks some lock objects lazily.
Declaration
void WriteLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | instanceId | Instance id of the scope who is requesting the lock |
System.Nullable<TimeSpan> | timeout | Timeout for the lock |
System.Int32[] | lockIds | Array of object identifiers. |