MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / reenqueue_all

Method reenqueue_all

dds/DCPS/WriteDataContainer.cpp:325–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325DDS::ReturnCode_t
326WriteDataContainer::reenqueue_all(const GUID_t& reader_id,
327 const DDS::LifespanQosPolicy& lifespan
328#ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
329 ,
330 const OPENDDS_STRING& filterClassName,
331 const FilterEvaluator* eval,
332 const DDS::StringSeq& expression_params
333#endif
334 )
335{
336 ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex,
337 guard,
338 lock_,
339 DDS::RETCODE_ERROR);
340
341 ssize_t total_size = 0;
342 for (PublicationInstanceMapType::iterator it = instances_.begin();
343 it != instances_.end(); ++it) {
344 const ssize_t durable = std::min(it->second->samples_.size(),
345 ssize_t(max_durable_per_instance_));
346 total_size += durable;
347 it->second->durable_samples_remaining_ = durable;
348 }
349
350 copy_and_prepend(resend_data_,
351 sending_data_,
352 reader_id,
353 lifespan,
354#ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
355 filterClassName, eval, expression_params,
356#endif
357 total_size);
358
359 copy_and_prepend(resend_data_,
360 sent_data_,
361 reader_id,
362 lifespan,
363#ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
364 filterClassName, eval, expression_params,
365#endif
366 total_size);
367
368 {
369 ACE_Guard<ACE_SYNCH_MUTEX> wfa_guard(wfa_lock_);
370 cached_cumulative_ack_valid_ = false;
371 DisjointSequence& ds = acked_sequences_[reader_id];
372 ds = acked_sequences_[GUID_UNKNOWN];
373
374 // Remove exactly what will be sent
375 SendStateDataSampleList::iterator iter = resend_data_.begin();
376 while (iter != resend_data_.end()) {
377 ds.erase(iter->get_header().sequence_);
378 ++iter;
379 }
380 }
381
382 if (DCPS_debug_level > 9 && resend_data_.size()) {

Callers 2

Calls 5

LogGuidFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected