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 static class ServantService
Inheritance
ServantService
Inherited Members

Methods

Drop(string)

Unregisters a function by name.

public static bool Drop(string name)

Parameters

name string

Returns

bool

wasDropped

Enqueue(Command)

Enqueues a command.

public static 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 static bool Enroll(string name, Func<string, ApplicationResponse<string>> serviceAction)

Parameters

name string

Name of function

serviceAction Func<string, ApplicationResponse<string>>

Function

Returns

bool

wasEnrolled

IsEmpty()

Indicates if queue is empty.

public static bool IsEmpty()

Returns

bool

isEmpty

ProcessAll()

Processes all commands in the queue.

public static IEnumerable<ApplicationResponse<string>> ProcessAll()

Returns

IEnumerable<ApplicationResponse<string>>

ProcessNext()

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

public static ApplicationResponse<string> ProcessNext()

Returns

ApplicationResponse<string>

result

To top