C# Класс 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.
Наследование: ZObject, IPollEvents
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

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

Метод Описание
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.

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

Метод Описание
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.

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

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

Release any contained resources - by destroying the poller and closing the mailbox.
public Destroy ( ) : void
Результат void

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

public ForceStop ( ) : void
Результат void

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

Handle input-ready events, by receiving and processing any commands that are waiting in the mailbox.
public InEvent ( ) : void
Результат void

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

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
Результат void

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

protected ProcessForceStop ( ) : void
Результат void

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

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
Результат void

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

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
Результат void

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

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
Результат void

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

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
Результат System

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

Start the contained Poller to begin polling.
public Start ( ) : void
Результат void

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

Issue the Stop command to this Reaper object.
public Stop ( ) : void
Результат void

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

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
Результат void