IDistributedLockService - интерфейс

Provides functionality to acquire and release tenant-wide locks which are distributed across all instances in a web farm.

Пространство имён:  Orchard.Tasks.Locking.Services
Сборка:  EleWise.ELMA.SDK.Web (в EleWise.ELMA.SDK.Web.dll) Версия: 1.0.0.0
Синтаксис
C#
public interface IDistributedLockService : IDependency

Тип IDistributedLockService предоставляет следующие члены.

Методы
  ИмяОписание
Открытый методAcquireLock
Acquires a named distributed lock within the current tenant or throws if the lock cannot be acquired.
Открытый методTryAcquireLock
Tries to acquire a named distributed lock within the current tenant.
В начало страницы
Методы расширения
  ИмяОписание
Открытый метод расширенияAcquireLock(String)Перегружен.
Acquires a named distributed lock with no expiration time within the current tenant.
(Определяется DistributedLockServiceExtensions.)
Открытый метод расширенияAcquireLock(String, NullableTimeSpan)Перегружен.
Acquires a named distributed lock with a given expiration time within the current tenant.
(Определяется DistributedLockServiceExtensions.)
Открытый метод расширенияTryAcquireLock(String, IDistributedLock)Перегружен.
Tries to immediately acquire a named distributed lock with no expiration time within the current tenant.
(Определяется DistributedLockServiceExtensions.)
Открытый метод расширенияTryAcquireLock(String, NullableTimeSpan, IDistributedLock)Перегружен.
Tries to immediately acquire a named distributed lock with a given expiration time within the current tenant.
(Определяется DistributedLockServiceExtensions.)
В начало страницы
Заметки
Distributed locks can be used to protect critical sections that should only ever be executed by a single thread of execution across a whole web farm. The distributed locks returned by this service are reentrant, i.e. the owner of a lock can reacquire it multiple times, and must also release it (dispose of it) as many times as it was acquired for the lock to be released.
См. также