libmoost
moost::mq::stream_manager Class Reference

#include <stream_manager.h>

List of all members.

Public Types

typedef boost::shared_ptr< streamstream_ptr
typedef std::pair< std::string,
stream_ptr
topic_stream_pair

Public Member Functions

 stream_manager (size_t consumer_pool_size)
 ~stream_manager ()
bool insert (const std::string &topic, stream::message_cb_t message_cb, stomp_client::ack::type ack_type, const boost::posix_time::time_duration &max_msg_interval)
bool erase (const std::string &topic)
void clear ()
void get_list (std::vector< topic_stream_pair > &topics) const
bool push_message (const std::string &topic, const std::string &message, stomp_client::ack::type &ack_type)
uint64_t get_num_processed () const
size_t get_num_pending () const
bool max_msg_interval_exceeded () const

Private Types

typedef std::map< std::string,
stream_ptr
stream_map
typedef std::pair< stream_ptr,
std::string > 
stream_message_pair

Private Member Functions

void consumer_thread ()

Private Attributes

stream_map m_streams
boost::mutex m_mx_streams
volatile uint64_t m_num_processed
boost::mutex m_mx_num_processed
boost::mutex m_mx_messages_list
boost::condition_variable m_cond_messages_list
std::deque< stream_message_pairm_messages_list
boost::thread_group m_consumer_threads
volatile sig_atomic_t m_running

Detailed Description

Definition at line 43 of file stream_manager.h.


Member Typedef Documentation

typedef std::map<std::string, stream_ptr> moost::mq::stream_manager::stream_map [private]

Definition at line 76 of file stream_manager.h.

typedef std::pair<stream_ptr, std::string> moost::mq::stream_manager::stream_message_pair [private]

Definition at line 77 of file stream_manager.h.

typedef boost::shared_ptr<stream> moost::mq::stream_manager::stream_ptr

Definition at line 46 of file stream_manager.h.

Definition at line 47 of file stream_manager.h.


Constructor & Destructor Documentation

moost::mq::stream_manager::stream_manager ( size_t  consumer_pool_size)

Definition at line 32 of file stream_manager.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 85 of file stream_manager.cpp.

Definition at line 132 of file stream_manager.cpp.

Here is the caller graph for this function:

bool moost::mq::stream_manager::erase ( const std::string &  topic)

Definition at line 69 of file stream_manager.cpp.

void moost::mq::stream_manager::get_list ( std::vector< topic_stream_pair > &  topics) const

Definition at line 91 of file stream_manager.cpp.

size_t moost::mq::stream_manager::get_num_pending ( ) const [inline]

Definition at line 67 of file stream_manager.h.

Here is the caller graph for this function:

uint64_t moost::mq::stream_manager::get_num_processed ( ) const [inline]

Definition at line 61 of file stream_manager.h.

Here is the caller graph for this function:

bool moost::mq::stream_manager::insert ( const std::string &  topic,
stream::message_cb_t  message_cb,
stomp_client::ack::type  ack_type,
const boost::posix_time::time_duration &  max_msg_interval 
)

Definition at line 54 of file stream_manager.cpp.

bool moost::mq::stream_manager::push_message ( const std::string &  topic,
const std::string &  message,
stomp_client::ack::type ack_type 
)

Definition at line 97 of file stream_manager.cpp.


Member Data Documentation

boost::condition_variable moost::mq::stream_manager::m_cond_messages_list [private]

Definition at line 88 of file stream_manager.h.

boost::thread_group moost::mq::stream_manager::m_consumer_threads [private]

Definition at line 91 of file stream_manager.h.

Definition at line 89 of file stream_manager.h.

boost::mutex moost::mq::stream_manager::m_mx_messages_list [mutable, private]

Definition at line 87 of file stream_manager.h.

boost::mutex moost::mq::stream_manager::m_mx_num_processed [mutable, private]

Definition at line 85 of file stream_manager.h.

boost::mutex moost::mq::stream_manager::m_mx_streams [mutable, private]

Definition at line 82 of file stream_manager.h.

volatile uint64_t moost::mq::stream_manager::m_num_processed [private]

Definition at line 84 of file stream_manager.h.

volatile sig_atomic_t moost::mq::stream_manager::m_running [private]

Definition at line 93 of file stream_manager.h.

Definition at line 81 of file stream_manager.h.


The documentation for this class was generated from the following files: