qpid::sys::LFProcessor Class Reference

This class processes a poll set using the leaders-followers pattern for thread synchronization: the leader will poll and on the poll returning, it will remove a session, promote a follower to leadership, then process the session. More...

#include <LFProcessor.h>

Inheritance diagram for qpid::sys::LFProcessor:

Inheritance graph
[legend]
Collaboration diagram for qpid::sys::LFProcessor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LFProcessor (apr_pool_t *pool, int workers, int size, int timeout)
void add (const apr_pollfd_t *const fd)
 Add the fd to the poll set.
void remove (const apr_pollfd_t *const fd)
 Remove the fd from the poll set.
void update (const apr_pollfd_t *const fd)
 Signal that the fd passed in, already part of the pollset, has had its flags altered.
void reactivate (const apr_pollfd_t *const fd)
 Add an fd back to the poll set after deactivation.
void deactivate (const apr_pollfd_t *const fd)
 Temporarily remove the fd from the poll set.
bool full ()
 Indicates whether the capacity of this processor has been reached (or whether it can still handle further fd's).
bool empty ()
 Indicates whether there are any fd's registered.
void stop ()
 Stop processing.
void start ()
 Start processing.
bool isStopped ()
 Is processing stopped?

Detailed Description

This class processes a poll set using the leaders-followers pattern for thread synchronization: the leader will poll and on the poll returning, it will remove a session, promote a follower to leadership, then process the session.


Member Function Documentation

void qpid::sys::LFProcessor::add ( const apr_pollfd_t *const   fd  ) 

Add the fd to the poll set.

Relies on the client_data being an instance of LFSessionContext.

void qpid::sys::LFProcessor::deactivate ( const apr_pollfd_t *const   fd  ) 

Temporarily remove the fd from the poll set.

Called when processing is about to begin.


The documentation for this class was generated from the following file:
Generated on Tue Apr 17 14:22:20 2007 for Qpid by  doxygen 1.4.7