C# Class 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.
Inheritance: Device
Afficher le fichier Open project: jgoz/crossroads-net

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

BackendHandler() protected méthode

Forwards replies from the backend socket to the frontend socket.
protected BackendHandler ( SocketEventArgs args ) : void
args SocketEventArgs A object containing the poll event args.
Résultat void

FrontendHandler() protected méthode

Forwards requests from the frontend socket to the backend socket.
protected FrontendHandler ( SocketEventArgs args ) : void
args SocketEventArgs A object containing the poll event args.
Résultat void

QueueDevice() public méthode

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() public méthode

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() public méthode

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() public méthode

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.