Table of Contents

Class ServantService

Namespace
Dynamicweb.LoadBalancing.Service
Assembly
Dynamicweb.Core.dll

This service handles all internal command execution on the current node.

public sealed class ServantService
Inheritance
ServantService
Inherited Members

Properties

EnrollmentsAreInitialized

public bool EnrollmentsAreInitialized { get; }

Property Value

bool

Methods

Drop(string)

Unregisters a function by name.

public bool Drop(string name)

Parameters

name string

Returns

bool

wasDropped

Enqueue(Command)

Enqueues a command.

public void Enqueue(Command command)

Parameters

command Command

Command to add

Enroll(string, Func<string, ApplicationResponse<string>>)

Registers a function that can be called later by using the name specified.

public bool Enroll(string name, Func<string, ApplicationResponse<string>> serviceAction)

Parameters

name string

Name of function

serviceAction Func<string, ApplicationResponse<string>>

Function

Returns

bool

wasEnrolled

InitializeEnrollments()

Initializes Enrollment instances. If enrollments are initialized, this method does nothing.

public void InitializeEnrollments()

InitializeEnrollments(bool)

Initializes Enrollment instances. If enrollments are initialized, this method does nothing unless force is true.

public void InitializeEnrollments(bool force)

Parameters

force bool

Set to true to force reinitialization of enrollments.

IsEmpty()

Indicates if queue is empty.

public bool IsEmpty()

Returns

bool

isEmpty

ProcessAll()

Processes all commands in the queue.

public IEnumerable<ApplicationResponse<string>> ProcessAll()

Returns

IEnumerable<ApplicationResponse<string>>

ProcessNext()

Processes the next command in the queue, if any exist, and returns a result.

public ApplicationResponse<string> ProcessNext()

Returns

ApplicationResponse<string>

result

To top