8 #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDBUFFER_H 9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDBUFFER_H 32 class DisjointSequence;
40 size_t capacity()
const;
43 virtual void retain_all(
const GUID_t& pub_id);
53 : strategy_(0), capacity_(capacity) {}
57 typedef std::pair<QueueType*, ACE_Message_Block*>
BufferType;
59 void resend_one(
const BufferType& buffer);
83 size_t n_chunks()
const;
90 void retain_all(
const GUID_t& pub_id);
96 bool is_last_fragment,
107 ssb_.mutex_.acquire();
112 ssb_.mutex_.release();
117 if (ssb_.buffers_.empty())
throw std::exception();
118 return ssb_.buffers_.begin()->first;
123 if (ssb_.buffers_.empty())
throw std::exception();
124 return ssb_.buffers_.rbegin()->first;
129 return ssb_.buffers_.empty();
134 return ssb_.buffers_.count(seq);
139 if (ssb_.buffers_.count(seq)) {
140 DestinationMap::const_iterator pos = ssb_.destinations_.find(seq);
141 destination = pos == ssb_.destinations_.end() ?
GUID_UNKNOWN : pos->second;
149 if (ssb_.pre_seq_.empty())
throw std::exception();
150 return *ssb_.pre_seq_.begin();
155 if (ssb_.pre_seq_.empty())
throw std::exception();
156 return *ssb_.pre_seq_.rbegin();
161 return ssb_.pre_seq_.empty();
166 return ssb_.pre_seq_.count(sequence);
172 return ssb_.resend_i(range, gaps);
176 const GUID_t& destination)
178 return ssb_.resend_i(range, gaps, destination);
183 size_t& cumulative_send_count)
185 ssb_.resend_fragments_i(sequence, fragments, cumulative_send_count);
190 return ssb_.has_frags(seq);
207 void check_capacity_i(BufferVec& removed);
208 void release_i(BufferMap::iterator buffer_iter);
209 void remove_i(BufferMap::iterator buffer_iter, BufferVec& removed);
219 const GUID_t& destination);
222 size_t& cumulative_send_count);
252 #ifdef __ACE_INLINE__ void resend_fragments_i(SequenceNumber sequence, const DisjointSequence &fragments, size_t &cumulative_send_count)
#define ACE_BEGIN_VERSIONED_NAMESPACE_DECL
SequenceNumber pre_high() const
SequenceNumberSet pre_seq_
bool resend_i(const SequenceRange &range, DisjointSequence *gaps, const GUID_t &destination)
bool contains(SequenceNumber seq) const
const GUID_t GUID_UNKNOWN
Nil value for GUID.
int bind(Container &c, const FirstType &first, const SecondType &second)
#define OpenDDS_Dcps_Export
#define OPENDDS_DELETED_COPY_MOVE_CTOR_ASSIGN(CLASS)
TransportSendStrategy::LockType LockType
SequenceNumber low() const
SequenceNumber high() const
static const size_t UNLIMITED
std::pair< QueueType *, ACE_Message_Block * > BufferType
LockType & strategy_lock()
RemoveResult
used by DataLink::remove_sample(), TransportSendStrategy, *RemoveVisitor
bool resend_i(const SequenceRange &range, DisjointSequence *gaps=0)
bool pre_contains(SequenceNumber sequence) const
TransportSendStrategy * strategy_
TransportSendBuffer(size_t capacity)
#define ACE_END_VERSIONED_NAMESPACE_DECL
bool has_frags(const SequenceNumber &seq) const
MessageBlockAllocator retained_mb_allocator_
Proxy(SingleSendBuffer &ssb)
std::pair< SequenceNumber, SequenceNumber > SequenceRange
SequenceNumber pre_low() const
DestinationMap destinations_
Sequence number abstraction. Only allows positive 64 bit values.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
MessageBlockAllocator replaced_mb_allocator_
DataBlockAllocator retained_db_allocator_
DataBlockAllocator replaced_db_allocator_
int insert(Container &c, const ValueType &v)
typedef OPENDDS_VECTOR(ActionConnectionRecord) ConnectionRecords
bool contains(SequenceNumber seq, GUID_t &destination) const
The Internal API and Implementation of OpenDDS.
TransportSendStrategy::QueueType QueueType
typedef OPENDDS_MAP(OPENDDS_STRING, OPENDDS_STRING) ValueMap
Helper types and functions for config file parsing.
SequenceNumber minimum_sn_allowed_
typedef OPENDDS_SET(NetworkAddress) AddrSet