C# Класс CrossroadsIO.Devices.QueueDevice

A shared queue that collects requests from a set of clients and distributes these fairly among a set of services.
Requests are fair-queued from frontend connections and load-balanced between backend connections. Replies automatically return to the client that made the original request. This device is part of the request-reply pattern. The frontend speaks to clients and the backend speaks to services.
Наследование: Device
Показать файл Открыть проект

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

Метод Описание
QueueDevice ( Context context )

Initializes a new instance of the QueueDevice class that will run in a self-managed thread.

QueueDevice ( Context context, DeviceMode mode )

Initializes a new instance of the QueueDevice class.

QueueDevice ( Context context, string frontendBindAddr, string backendBindAddr )

Initializes a new instance of the QueueDevice class that will run in a self-managed thread.

QueueDevice ( Context context, string frontendBindAddr, string backendBindAddr, DeviceMode mode )

Initializes a new instance of the QueueDevice class.

Защищенные методы

Метод Описание
BackendHandler ( SocketEventArgs args ) : void

Forwards replies from the backend socket to the frontend socket.

FrontendHandler ( SocketEventArgs args ) : void

Forwards requests from the frontend socket to the backend socket.

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

BackendHandler() защищенный Метод

Forwards replies from the backend socket to the frontend socket.
protected BackendHandler ( SocketEventArgs args ) : void
args SocketEventArgs A object containing the poll event args.
Результат void

FrontendHandler() защищенный Метод

Forwards requests from the frontend socket to the backend socket.
protected FrontendHandler ( SocketEventArgs args ) : void
args SocketEventArgs A object containing the poll event args.
Результат void

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

Initializes a new instance of the QueueDevice class that will run in a self-managed thread.
public QueueDevice ( Context context )
context Context The to use when creating the sockets.

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

Initializes a new instance of the QueueDevice class.
public QueueDevice ( Context context, DeviceMode mode )
context Context The to use when creating the sockets.
mode DeviceMode The for the current device.

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

Initializes a new instance of the QueueDevice class that will run in a self-managed thread.
public QueueDevice ( Context context, string frontendBindAddr, string backendBindAddr )
context Context The to use when creating the sockets.
frontendBindAddr string The endpoint used to bind the frontend socket.
backendBindAddr string The endpoint used to bind the backend socket.

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

Initializes a new instance of the QueueDevice class.
public QueueDevice ( Context context, string frontendBindAddr, string backendBindAddr, DeviceMode mode )
context Context The to use when creating the sockets.
frontendBindAddr string The endpoint used to bind the frontend socket.
backendBindAddr string The endpoint used to bind the backend socket.
mode DeviceMode The for the current device.