C# Class NetMQ.Core.Reaper

Class Reaper is a ZObject and implements IPollEvents. The Reaper is dedicated toward handling socket shutdown asynchronously and cleanly. By passing this task off to the Reaper, the message-queueing subsystem can terminate immediately.
Inheritance: ZObject, IPollEvents
Afficher le fichier Open project: NetMQ/NetMQ3-x Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
Destroy ( ) : void

Release any contained resources - by destroying the poller and closing the mailbox.

ForceStop ( ) : void
InEvent ( ) : void

Handle input-ready events, by receiving and processing any commands that are waiting in the mailbox.

OutEvent ( ) : void

This method normally is for handling output-ready events, which don't apply here.

Reaper ( [ ctx, int threadId ) : System

Create a new Reaper with the given thread-id. This will have a new Poller with the name "reaper-" + thread-id, and a Mailbox of that same name.

Start ( ) : void

Start the contained Poller to begin polling.

Stop ( ) : void

Issue the Stop command to this Reaper object.

TimerEvent ( int id ) : void

This would be called when a timer expires - however in this event NotSupportedException would be thrown.

Méthodes protégées

Méthode Description
ProcessForceStop ( ) : void
ProcessReap ( SocketBase socket ) : void

Add the given socket to the list to be reaped (terminated).

ProcessReaped ( ) : void

Respond to having one of the sockets that are marked for reaping, - finished being reaped, and if there are none left - send the Done command and stop the poller.

ProcessStop ( ) : void

Respond to the Stop command by signaling the polling-loop to terminate, and if there're no sockets left to reap - stop the poller.

Method Details

Destroy() public méthode

Release any contained resources - by destroying the poller and closing the mailbox.
public Destroy ( ) : void
Résultat void

ForceStop() public méthode

public ForceStop ( ) : void
Résultat void

InEvent() public méthode

Handle input-ready events, by receiving and processing any commands that are waiting in the mailbox.
public InEvent ( ) : void
Résultat void

OutEvent() public méthode

This method normally is for handling output-ready events, which don't apply here.
You must not call OutEvent on a Reaper.
public OutEvent ( ) : void
Résultat void

ProcessForceStop() protected méthode

protected ProcessForceStop ( ) : void
Résultat void

ProcessReap() protected méthode

Add the given socket to the list to be reaped (terminated).
protected ProcessReap ( SocketBase socket ) : void
socket SocketBase the socket to add to the list for termination
Résultat void

ProcessReaped() protected méthode

Respond to having one of the sockets that are marked for reaping, - finished being reaped, and if there are none left - send the Done command and stop the poller.
protected ProcessReaped ( ) : void
Résultat void

ProcessStop() protected méthode

Respond to the Stop command by signaling the polling-loop to terminate, and if there're no sockets left to reap - stop the poller.
protected ProcessStop ( ) : void
Résultat void

Reaper() public méthode

Create a new Reaper with the given thread-id. This will have a new Poller with the name "reaper-" + thread-id, and a Mailbox of that same name.
public Reaper ( [ ctx, int threadId ) : System
ctx [ the Ctx for this to be in
threadId int an integer id to give to the thread this will live on
Résultat System

Start() public méthode

Start the contained Poller to begin polling.
public Start ( ) : void
Résultat void

Stop() public méthode

Issue the Stop command to this Reaper object.
public Stop ( ) : void
Résultat void

TimerEvent() public méthode

This would be called when a timer expires - however in this event NotSupportedException would be thrown.
You must not call TimerEvent on a Reaper.
public TimerEvent ( int id ) : void
id int an integer used to identify the timer
Résultat void