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

Method stopInstrumentation

tools/monitor/MonitorTask.cpp:156–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void
157Monitor::MonitorTask::stopInstrumentation()
158{
159 // Only shutdown if we are currently actively processing data from a
160 // repository.
161 if( CORBA::is_nil( this->participant_.in())) {
162 return;
163 }
164
165 ACE_DEBUG((LM_DEBUG,
166 ACE_TEXT("(%P|%t) MonitorTask::stopInstrumentation() - ")
167 ACE_TEXT("removing participant for domain %d.\n"),
168 this->participant_->get_domain_id()
169 ));
170
171 ACE_GUARD(ACE_SYNCH_MUTEX, guard, this->lock_);
172
173 // Clean up the wait conditions.
174 DDS::ConditionSeq conditions;
175 this->waiter_->get_conditions( conditions);
176 this->waiter_->detach_conditions( conditions);
177
178 // Reattach the guard condition.
179 this->waiter_->attach_condition( this->guardCondition_);
180
181 // Terminate the transport resources.
182
183 // It is possible that the repository was down at this point,
184 // and we do not want the exception stop the monitor process
185 // so catch exception here.
186 try {
187 // Destroy the instrumentation participant.
188 this->participant_->delete_contained_entities();
189 TheParticipantFactory->delete_participant( this->participant_.in());
190 }
191 catch (const CORBA::TRANSIENT&)
192 {
193 ACE_DEBUG((LM_DEBUG,
194 ACE_TEXT("(%P|%t) MonitorTask::stopInstrumentation() - ")
195 ACE_TEXT("caught TRANSIENT exception.\n")
196 ));
197 }
198 catch (const CORBA::Exception& ex) {
199 ex._tao_print_exception("(%P|%t) MonitorTask::stopInstrumentation() - ");
200 throw;
201 }
202 catch (...) {
203 throw;
204 }
205
206 this->participant_ = DDS::DomainParticipant::_nil();
207}
208
209Monitor::MonitorTask::RepoKey
210Monitor::MonitorTask::setRepoIor( const std::string& ior)

Callers 4

closeMethod · 0.95
setRepoIorMethod · 0.95
newRepoMethod · 0.45
newRepoMethod · 0.45

Calls 8

get_conditionsMethod · 0.80
detach_conditionsMethod · 0.80
attach_conditionMethod · 0.80
delete_participantMethod · 0.80
_tao_print_exceptionMethod · 0.80
inMethod · 0.45
get_domain_idMethod · 0.45

Tested by

no test coverage detected