Class SingleServerRoleAccessor
Provides server role access for single-server deployments.
Inheritance
object
Namespace: Umbraco.Cms.Core.Sync
Assembly: Umbraco.Core.dll
Syntax
public class SingleServerRoleAccessor : IServerRoleAccessor
Remarks
Can be used when Umbraco is definitely not operating in a load balanced scenario to micro-optimize some startup performance.
The micro optimization is specifically to avoid a DB query just after the app starts up to determine the ServerRole, which by default is done with scheduling publisher election by a database query. The master election process doesn't occur until just after startup so this micro optimization doesn't really affect the primary startup phase.
Constructors
View SourceSingleServerRoleAccessor()
Declaration
public SingleServerRoleAccessor()
Properties
View SourceCurrentServerRole
Gets the role of the current server in the application environment.
Declaration
public ServerRole CurrentServerRole { get; }
Property Value
| Type | Description |
|---|---|
| ServerRole |