Table of Contents

Interface IWebFarmService

Namespace
CMS.Core
Assembly
CMS.Core.dll

Web farm service interface

public interface IWebFarmService
Extension Methods

Properties

ServerName

Returns unique identifier of the server.

string ServerName { get; }

Property Value

string

SynchronizeDeleteFiles

Gets or sets value that indicates whether file delete synchronization is enabled.

[Obsolete("The property is no longer used by the system.")]
[ObsoleteSince(29, 3)]
bool SynchronizeDeleteFiles { get; }

Property Value

bool

SynchronizeFiles

Gets or sets value that indicates whether file synchronization is enabled.

[Obsolete("The property is no longer used by the system.")]
[ObsoleteSince(29, 3)]
bool SynchronizeFiles { get; }

Property Value

bool

SynchronizePhysicalFiles

Gets value that indicates whether file synchronization for physical project files is enabled.

[Obsolete("The property is no longer used by the system.")]
[ObsoleteSince(29, 3)]
bool SynchronizePhysicalFiles { get; }

Property Value

bool

WebFarmEnabled

Returns true if the web farm is enabled.

bool WebFarmEnabled { get; }

Property Value

bool

Methods

CreateTask(WebFarmTaskBase)

Creates task.

bool CreateTask(WebFarmTaskBase task)

Parameters

task WebFarmTaskBase

Web farm task to be created.

Returns

bool

Returns true if the task was created (web farm is set up and task was allowed)

GetEnabledServerNames()

Gets enumeration of names of all enabled web farm servers.

IEnumerable<string> GetEnabledServerNames()

Returns

IEnumerable<string>

RegisterTask<T>(bool, WebFarmTaskOptimizeActionEnum)

Registers a new web farm task type to allow its processing within the system. The type must inherit WebFarmTaskBase.

void RegisterTask<T>(bool isMemoryTask = false, WebFarmTaskOptimizeActionEnum webFarmTaskOptimize = WebFarmTaskOptimizeActionEnum.None) where T : WebFarmTaskBase, new()

Parameters

isMemoryTask bool

Indicates if the task modifies memory only. Memory tasks can be deleted on application start.

webFarmTaskOptimize WebFarmTaskOptimizeActionEnum

Determines type of optimization which is used for reducing number of generated web farm tasks of particular type.

Type Parameters

T

Exceptions

ArgumentException

Thrown when task to be registered does not have parameterless constructor.

InvalidOperationException

Thrown when task has been already registered.