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
파일 보기 프로젝트 열기: NetMQ/NetMQ3-x 1 사용 예제들

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