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

Method finalize

dds/InfoRepo/FederatorManagerImpl.cpp:790–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

788}
789
790void
791ManagerImpl::finalize()
792{
793 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
794 ACE_DEBUG((LM_DEBUG,
795 ACE_TEXT("(%P|%t) Federator::ManagerImpl::finalize()\n")));
796 }
797
798 ownerListener_.stop();
799 topicListener_.stop();
800 participantListener_.stop();
801 publicationListener_.stop();
802 subscriptionListener_.stop();
803 ownerListener_.join();
804 topicListener_.join();
805 participantListener_.join();
806 publicationListener_.join();
807 subscriptionListener_.join();
808
809 if (this->federated_) {
810 try {
811 IdToManagerMap::iterator where = this->peers_.find(this->joinRepo_);
812
813 if (where == this->peers_.end()) {
814 ACE_DEBUG((LM_DEBUG,
815 ACE_TEXT("(%P|%t) Federator::Manager::finalize: ")
816 ACE_TEXT("repository %d - all attachment to federation left.\n"),
817 this->id().id()));
818
819 } else {
820 if (CORBA::is_nil(where->second.in())) {
821 ACE_ERROR((LM_ERROR,
822 ACE_TEXT("(%P|%t) ERROR: Federator::Manager::finalize: ")
823 ACE_TEXT("repository %d not currently attached to a federation.\n"),
824 this->id().id()));
825
826 } else {
827 where->second->leave_federation(this->id().id());
828 this->federated_ = false;
829 }
830 }
831
832 } catch (const CORBA::Exception& ex) {
833 ex._tao_print_exception(
834 ACE_TEXT("ERROR: Federator::ManagerImpl::finalize() - ")
835 ACE_TEXT("unable to leave remote federation "));
836 throw Incomplete();
837 }
838 }
839
840 if (!CORBA::is_nil(this->orb_.in()) && (0 != this->orb_->orb_core())) {
841 this->orb_->orb_core()->reactor()->remove_handler(
842 &this->multicastResponder_,
843 ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
844 }
845
846 // Remove our local participant and contained entities.
847 if (federationParticipant_) {

Callers

nothing calls this directly

Calls 13

retcode_to_stringFunction · 0.85
leave_federationMethod · 0.80
_tao_print_exceptionMethod · 0.80
delete_participantMethod · 0.80
stopMethod · 0.65
joinMethod · 0.45
findMethod · 0.45
endMethod · 0.45
idMethod · 0.45
inMethod · 0.45
remove_handlerMethod · 0.45
reactorMethod · 0.45

Tested by

no test coverage detected