Class SqlMainDomLock
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Runtime
Assembly: Umbraco.Infrastructure.dll
Syntax
public class SqlMainDomLock : IMainDomLock
Constructors
View SourceSqlMainDomLock(ILoggerFactory, IOptions<GlobalSettings>, IOptionsMonitor<ConnectionStrings>, IDbProviderFactoryCreator, IMainDomKeyGenerator, DatabaseSchemaCreatorFactory, NPocoMapperCollection)
Declaration
public SqlMainDomLock(ILoggerFactory loggerFactory, IOptions<GlobalSettings> globalSettings, IOptionsMonitor<ConnectionStrings> connectionStrings, IDbProviderFactoryCreator dbProviderFactoryCreator, IMainDomKeyGenerator mainDomKeyGenerator, DatabaseSchemaCreatorFactory databaseSchemaCreatorFactory, NPocoMapperCollection npocoMappers)
Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory | loggerFactory | |
| IOptions<GlobalSettings> | globalSettings | |
| IOptionsMonitor<ConnectionStrings> | connectionStrings | |
| IDbProviderFactoryCreator | dbProviderFactoryCreator | |
| IMainDomKeyGenerator | mainDomKeyGenerator | |
| DatabaseSchemaCreatorFactory | databaseSchemaCreatorFactory | |
| NPocoMapperCollection | npocoMappers |
Methods
View SourceAcquireLockAsync(int)
Acquires an application-wide distributed lock
Declaration
public Task<bool> AcquireLockAsync(int millisecondsTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| int | millisecondsTimeout |
Returns
| Type | Description |
|---|---|
| Task<bool> | An awaitable boolean value which will be false if the elapsed millsecondsTimeout value is exceeded |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
ListenAsync()
Wait on a background thread to receive a signal from another AppDomain
Declaration
public Task ListenAsync()
Returns
| Type | Description |
|---|---|
| Task |