C# Класс BlueCollar.Machine

Provides machine coordination services, managing all workers on a machine for an application.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
Machine ( ) : System

Initializes a new instance of the Machine class.

Machine ( ILogger logger ) : System

Initializes a new instance of the Machine class.

Machine ( ILogger logger, IRepositoryFactory repositoryFactory, string applicationName, string address, string name, int heartbeat, int workerHeartbeat, bool schedulerEnabled, bool ensureDefaultWorker ) : System

Initializes a new instance of the Machine class.

Приватные методы

Метод Описание
CreateDefaultWorker ( ) : Worker

Creates a default worker.

Dispose ( ) : void
Dispose ( bool force ) : void
Dispose ( bool force, bool disposing ) : void
GetMachineAddress ( ) : string
GetPrivateMachineAddress ( ) : string

Gets the current machine's private IP address.

GetPublicMachineAddress ( ) : string

Gets the current machine's public IP address.

RefreshWorkers ( ) : void
RunLoop ( ) : void
WorkerDisposing ( object sender, EventArgs e ) : void

Handles a worker's Disposing event.

Описание методов

Machine() публичный Метод

Initializes a new instance of the Machine class.
public Machine ( ) : System
Результат System

Machine() публичный Метод

Initializes a new instance of the Machine class.
public Machine ( ILogger logger ) : System
logger ILogger The logger to use when logging messages.
Результат System

Machine() публичный Метод

Initializes a new instance of the Machine class.
public Machine ( ILogger logger, IRepositoryFactory repositoryFactory, string applicationName, string address, string name, int heartbeat, int workerHeartbeat, bool schedulerEnabled, bool ensureDefaultWorker ) : System
logger ILogger The logger to use when logging messages.
repositoryFactory IRepositoryFactory The repository factory to use when creating repositories for data access.
applicationName string The name of the application to manage workers for.
address string The address of the machine.
name string The name of the machine.
heartbeat int The heartbeat, in seconds, to use when polling for additions or removal of workers.
workerHeartbeat int The heartbeat, in seconds, the workers should use when polling for work.
schedulerEnabled bool A value indicating whether the job scheduler is enabled.
ensureDefaultWorker bool A value indicating whether to ensure at least one worker exists, creating it if necessary.
Результат System