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, params int[])
Declaration
void EagerReadLock(Guid instanceId, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| int[] | lockIds |
EagerReadLock(Guid, TimeSpan?, params int[])
Eagerly acquires a read-lock
Declaration
void EagerReadLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| TimeSpan? | timeout | Timeout for the lock |
| int[] | lockIds |
EagerWriteLock(Guid, params int[])
Declaration
void EagerWriteLock(Guid instanceId, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| int[] | lockIds |
EagerWriteLock(Guid, TimeSpan?, params int[])
Eagerly acquires a write-lock
Declaration
void EagerWriteLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| TimeSpan? | timeout | Timeout for the lock |
| int[] | 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 |
|---|---|
| Dictionary<Guid, Dictionary<int, int>> |
GetWriteLocks()
Declaration
Dictionary<Guid, Dictionary<int, int>>? GetWriteLocks()
Returns
| Type | Description |
|---|---|
| Dictionary<Guid, Dictionary<int, int>> |
ReadLock(Guid, params int[])
Declaration
void ReadLock(Guid instanceId, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| int[] | lockIds |
ReadLock(Guid, TimeSpan?, params int[])
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 |
| TimeSpan? | timeout | Timeout for the lock |
| int[] | lockIds | Array of lock object identifiers. |
WriteLock(Guid, params int[])
Declaration
void WriteLock(Guid instanceId, params int[] lockIds)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | instanceId | |
| int[] | lockIds |
WriteLock(Guid, TimeSpan?, params int[])
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 |
| TimeSpan? | timeout | Timeout for the lock |
| int[] | lockIds | Array of object identifiers. |