| 692 | } |
| 693 | |
| 694 | void DataWriterImpl::replay_durable_data_for(const GUID_t& remote_id) |
| 695 | { |
| 696 | DBG_ENTRY_LVL("DataWriterImpl", "replay_durable_data_for", 6); |
| 697 | |
| 698 | bool reader_durable = false; |
| 699 | #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC |
| 700 | OPENDDS_STRING filterClassName; |
| 701 | RcHandle<FilterEvaluator> eval; |
| 702 | DDS::StringSeq expression_params; |
| 703 | #endif |
| 704 | |
| 705 | { |
| 706 | ACE_GUARD(ACE_Thread_Mutex, reader_info_guard, this->reader_info_lock_); |
| 707 | RepoIdToReaderInfoMap::const_iterator it = reader_info_.find(remote_id); |
| 708 | |
| 709 | if (it != reader_info_.end()) { |
| 710 | reader_durable = it->second.durable_; |
| 711 | #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC |
| 712 | filterClassName = it->second.filter_class_name_; |
| 713 | eval = it->second.eval_; |
| 714 | expression_params = it->second.expression_params_; |
| 715 | #endif |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | // Support DURABILITY QoS |
| 720 | if (reader_durable) { |
| 721 | // Tell the WriteDataContainer to resend all sending/sent |
| 722 | // samples. |
| 723 | this->data_container_->reenqueue_all(remote_id, this->qos_.lifespan |
| 724 | #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC |
| 725 | , filterClassName, eval.in(), expression_params |
| 726 | #endif |
| 727 | ); |
| 728 | |
| 729 | // Acquire the data writer container lock to avoid deadlock. The |
| 730 | // thread calling association_complete() has to acquire lock in the |
| 731 | // same order as the write()/register() operation. |
| 732 | |
| 733 | // Since the thread calling association_complete() is the ORB |
| 734 | // thread, it may have some performance penalty. If the |
| 735 | // performance is an issue, we may need a new thread to handle the |
| 736 | // data_available() calls. |
| 737 | ACE_GUARD(ACE_Recursive_Thread_Mutex, |
| 738 | guard, |
| 739 | this->get_lock()); |
| 740 | |
| 741 | SendStateDataSampleList list = this->get_resend_data(); |
| 742 | { |
| 743 | ACE_GUARD(ACE_Thread_Mutex, reader_info_guard, this->reader_info_lock_); |
| 744 | // Update the reader's expected sequence |
| 745 | SequenceNumber& seq = |
| 746 | reader_info_.find(remote_id)->second.expected_sequence_; |
| 747 | |
| 748 | for (SendStateDataSampleList::iterator list_el = list.begin(); |
| 749 | list_el != list.end(); ++list_el) { |
| 750 | list_el->get_header().historic_sample_ = true; |
| 751 |
nothing calls this directly
no test coverage detected