Class ElectedServerRoleAccessor
Gets the current server's ServerRole based on active servers registered with IServerRegistrationService
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Sync
Assembly: Umbraco.Core.dll
Syntax
public sealed class ElectedServerRoleAccessor : IServerRoleAccessor
Remarks
This is the default service which determines a server's role by using a master election process. The scheduling publisher election process doesn't occur until just after startup so this election process doesn't really affect the primary startup phase.
Constructors
View SourceElectedServerRoleAccessor(IServerRegistrationService)
Initializes a new instance of the ElectedServerRoleAccessor class.
Declaration
public ElectedServerRoleAccessor(IServerRegistrationService registrationService)
Parameters
Type | Name | Description |
---|---|---|
IServerRegistrationService | registrationService | The registration service. |
Properties
View SourceCurrentServerRole
Gets the role of the current server in the application environment.
Declaration
public ServerRole CurrentServerRole { get; }
Property Value
Type | Description |
---|---|
ServerRole |