OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <TransactionalRtpsSendQueue.h>
Public Member Functions | |
TransactionalRtpsSendQueue () | |
bool | enqueue (const MetaSubmessage &ms) |
bool | enqueue (const MetaSubmessageVec &vec) |
void | begin_transaction () |
Signal that a thread is beginning to send a sequence of submessages. More... | |
void | ready_to_send () |
Indicate that the queue is ready to send after all pending transactions are complete. More... | |
void | end_transaction (MetaSubmessageVec &vec) |
void | ignore (const GUID_t &local, const GUID_t &remote) |
Mark all queued submessage with the given source and destination as ignored. More... | |
void | ignore_remote (const GUID_t &id) |
Mark all queued submessage with the given destination (dst_guid_) as ignored. More... | |
void | ignore_local (const GUID_t &id) |
Mark all queued submessage with the given source (src_guid_) as ignored. More... | |
Private Attributes | |
ACE_Thread_Mutex | mutex_ |
MetaSubmessageVec | queue_ |
bool | ready_to_send_ |
size_t | active_transaction_count_ |
A Transactional Send Queue Class For MetaSubmessages
This class is designed to collect submessages from various threads in a transactional way so they can be more efficiently bundled.
Definition at line 25 of file TransactionalRtpsSendQueue.h.
OpenDDS::DCPS::TransactionalRtpsSendQueue::TransactionalRtpsSendQueue | ( | ) |
Definition at line 13 of file TransactionalRtpsSendQueue.cpp.
void OpenDDS::DCPS::TransactionalRtpsSendQueue::begin_transaction | ( | ) |
Signal that a thread is beginning to send a sequence of submessages.
Definition at line 37 of file TransactionalRtpsSendQueue.cpp.
References active_transaction_count_, and mutex_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::enable_response_queue(), and OpenDDS::DCPS::RtpsUdpDataLink::harvest_send_queue().
void OpenDDS::DCPS::TransactionalRtpsSendQueue::end_transaction | ( | MetaSubmessageVec & | vec | ) |
Signal that a thread is ending a sequence of submessages. This method will swap the provided vec with the pending queue if the queue is ready to send.
Definition at line 50 of file TransactionalRtpsSendQueue.cpp.
References active_transaction_count_, mutex_, queue_, and ready_to_send_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::disable_response_queue().
bool OpenDDS::DCPS::TransactionalRtpsSendQueue::enqueue | ( | const MetaSubmessage & | ms | ) |
Add a single submessage to the queue Returns true if the queue was empty.
Definition at line 19 of file TransactionalRtpsSendQueue.cpp.
References mutex_, and queue_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::queue_submessages().
bool OpenDDS::DCPS::TransactionalRtpsSendQueue::enqueue | ( | const MetaSubmessageVec & | vec | ) |
Add a vector of submessages to the queue Returns true if the queue was empty and now not empty.
Definition at line 27 of file TransactionalRtpsSendQueue.cpp.
References mutex_, and queue_.
void OpenDDS::DCPS::TransactionalRtpsSendQueue::ignore | ( | const GUID_t & | local, |
const GUID_t & | remote | ||
) |
Mark all queued submessage with the given source and destination as ignored.
Definition at line 62 of file TransactionalRtpsSendQueue.cpp.
References mutex_, and queue_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::associated().
void OpenDDS::DCPS::TransactionalRtpsSendQueue::ignore_local | ( | const GUID_t & | id | ) |
Mark all queued submessage with the given source (src_guid_) as ignored.
Definition at line 82 of file TransactionalRtpsSendQueue.cpp.
References mutex_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, and queue_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::client_stop().
void OpenDDS::DCPS::TransactionalRtpsSendQueue::ignore_remote | ( | const GUID_t & | id | ) |
Mark all queued submessage with the given destination (dst_guid_) as ignored.
Definition at line 72 of file TransactionalRtpsSendQueue.cpp.
References mutex_, and queue_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::disassociated().
void OpenDDS::DCPS::TransactionalRtpsSendQueue::ready_to_send | ( | ) |
Indicate that the queue is ready to send after all pending transactions are complete.
Definition at line 43 of file TransactionalRtpsSendQueue.cpp.
References mutex_, and ready_to_send_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::harvest_send_queue().
|
private |
Definition at line 62 of file TransactionalRtpsSendQueue.h.
Referenced by begin_transaction(), and end_transaction().
|
mutableprivate |
Definition at line 58 of file TransactionalRtpsSendQueue.h.
Referenced by begin_transaction(), end_transaction(), enqueue(), ignore(), ignore_local(), ignore_remote(), and ready_to_send().
|
private |
Definition at line 60 of file TransactionalRtpsSendQueue.h.
Referenced by end_transaction(), enqueue(), ignore(), ignore_local(), and ignore_remote().
|
private |
Definition at line 61 of file TransactionalRtpsSendQueue.h.
Referenced by end_transaction(), and ready_to_send().