Class DatabaseServerRegistrar
A registrar that stores registered server nodes in the database.
Inheritance
System.Object
Namespace: Umbraco.Core.Sync
Assembly: Umbraco.Core.dll
Syntax
public sealed class DatabaseServerRegistrar : IServerRegistrar
Remarks
This is the default registrar which determines a server's role by using a master election process. The master election process doesn't occur until just after startup so this election process doesn't really affect the primary startup phase.
Constructors
View SourceDatabaseServerRegistrar(Lazy<IServerRegistrationService>, DatabaseServerRegistrarOptions)
Initializes a new instance of the DatabaseServerRegistrar class.
Declaration
public DatabaseServerRegistrar(Lazy<IServerRegistrationService> registrationService, DatabaseServerRegistrarOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Lazy<IServerRegistrationService> | registrationService | The registration service. |
DatabaseServerRegistrarOptions | options | Some options. |
Properties
View SourceOptions
Gets or sets the registrar options.
Declaration
public DatabaseServerRegistrarOptions Options { get; }
Property Value
Type | Description |
---|---|
DatabaseServerRegistrarOptions |
Registrations
Gets the registered servers.
Declaration
public IEnumerable<IServerAddress> Registrations { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IServerAddress> |
Methods
View SourceGetCurrentServerRole()
Gets the role of the current server in the application environment.
Declaration
public ServerRole GetCurrentServerRole()
Returns
Type | Description |
---|---|
ServerRole |
GetCurrentServerUmbracoApplicationUrl()
Gets the current umbraco application URL.
Declaration
public string GetCurrentServerUmbracoApplicationUrl()
Returns
Type | Description |
---|---|
System.String |