OpenDDS::DCPS::EndHistoricSamplesMissedSweeper Class Reference

#include <DataReaderImpl.h>

Inheritance diagram for OpenDDS::DCPS::EndHistoricSamplesMissedSweeper:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::EndHistoricSamplesMissedSweeper:
Collaboration graph
[legend]

List of all members.

Classes

class  CancelCommand
class  CommandBase
class  ScheduleCommand

Public Member Functions

 EndHistoricSamplesMissedSweeper (ACE_Reactor *reactor, ACE_thread_t owner, DataReaderImpl *reader)
void schedule_timer (OpenDDS::DCPS::RcHandle< OpenDDS::DCPS::WriterInfo > &info)
void cancel_timer (OpenDDS::DCPS::RcHandle< OpenDDS::DCPS::WriterInfo > &info)
int handle_timeout (const ACE_Time_Value &current_time, const void *arg)
virtual bool reactor_is_shut_down () const

Private Member Functions

 ~EndHistoricSamplesMissedSweeper ()
 OPENDDS_SET (RcHandle< OpenDDS::DCPS::WriterInfo >) info_set_

Private Attributes

WeakRcHandle< DataReaderImplreader_

Detailed Description

Definition at line 123 of file DataReaderImpl.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::EndHistoricSamplesMissedSweeper ( ACE_Reactor reactor,
ACE_thread_t  owner,
DataReaderImpl reader 
)

Definition at line 3329 of file DataReaderImpl.cpp.

03332   : ReactorInterceptor (reactor, owner)
03333   , reader_(*reader)
03334 { }

OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::~EndHistoricSamplesMissedSweeper (  )  [private]

Definition at line 3336 of file DataReaderImpl.cpp.

03337 { }


Member Function Documentation

void OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::cancel_timer ( OpenDDS::DCPS::RcHandle< OpenDDS::DCPS::WriterInfo > &  info  ) 

Definition at line 3346 of file DataReaderImpl.cpp.

References c, and OpenDDS::DCPS::ReactorInterceptor::execute_or_enqueue().

03347 {
03348   info->waiting_for_end_historic_samples_ = false;
03349   CancelCommand c(this, info);
03350   execute_or_enqueue(c);
03351 }

Here is the call graph for this function:

int OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::handle_timeout ( const ACE_Time_Value current_time,
const void *  arg 
) [virtual]

Reimplemented from ACE_Event_Handler.

Definition at line 3353 of file DataReaderImpl.cpp.

References OpenDDS::DCPS::DCPS_debug_level, LM_INFO, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::DCPS::ReactorInterceptor::mutex_, OPENDDS_STRING, OpenDDS::DCPS::rchandle_from(), reader_, and OpenDDS::DCPS::WriterInfo::writer_id_.

03356 {
03357 
03358   WriterInfo* const info =
03359     const_cast<WriterInfo*>(reinterpret_cast<const WriterInfo*>(arg));
03360   const PublicationId pub_id = info->writer_id_;
03361 
03362   {
03363     ACE_Guard<ACE_Thread_Mutex> guard(this->mutex_);
03364     info_set_.erase(rchandle_from(info));
03365   }
03366 
03367   RcHandle<DataReaderImpl> reader = reader_.lock();
03368   if (!reader)
03369     return 0;
03370 
03371   if (DCPS_debug_level >= 1) {
03372     GuidConverter sub_repo(reader->get_repo_id());
03373     GuidConverter pub_repo(pub_id);
03374     ACE_DEBUG((LM_INFO, "(%P|%t) EndHistoricSamplesMissedSweeper::handle_timeout reader: %C waiting on writer: %C\n",
03375                OPENDDS_STRING(sub_repo).c_str(),
03376                OPENDDS_STRING(pub_repo).c_str()));
03377   }
03378 
03379   reader->resume_sample_processing(pub_id);
03380   return 0;
03381 }

Here is the call graph for this function:

OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::OPENDDS_SET ( RcHandle< OpenDDS::DCPS::WriterInfo  )  [private]
virtual bool OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::reactor_is_shut_down (  )  const [inline, virtual]

Implements OpenDDS::DCPS::ReactorInterceptor.

Definition at line 135 of file DataReaderImpl.h.

References TheServiceParticipant.

00136   {
00137     return TheServiceParticipant->is_shut_down();
00138   }

void OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::schedule_timer ( OpenDDS::DCPS::RcHandle< OpenDDS::DCPS::WriterInfo > &  info  ) 

Definition at line 3339 of file DataReaderImpl.cpp.

References c, and OpenDDS::DCPS::ReactorInterceptor::execute_or_enqueue().

03340 {
03341   info->waiting_for_end_historic_samples_ = true;
03342   ScheduleCommand c(this, info);
03343   execute_or_enqueue(c);
03344 }

Here is the call graph for this function:


Member Data Documentation

Definition at line 143 of file DataReaderImpl.h.

Referenced by handle_timeout().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1