OpenDDS::DCPS::NakWatchdog Class Reference

#include <ReliableSession.h>

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

List of all members.

Public Member Functions

 NakWatchdog (ACE_Reactor *reactor, ACE_thread_t owner, ReliableSession *session)
virtual bool reactor_is_shut_down () const

Protected Member Functions

virtual ACE_Time_Value next_interval ()
virtual void on_interval (const void *arg)

Private Member Functions

 ~NakWatchdog ()

Private Attributes

ReliableSessionsession_

Detailed Description

Definition at line 29 of file ReliableSession.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::NakWatchdog::NakWatchdog ( ACE_Reactor reactor,
ACE_thread_t  owner,
ReliableSession session 
) [explicit]

Definition at line 28 of file ReliableSession.cpp.

00031   : DataLinkWatchdog(reactor, owner)
00032   , session_(session)
00033 {
00034 }

OpenDDS::DCPS::NakWatchdog::~NakWatchdog (  )  [inline, private]

Definition at line 43 of file ReliableSession.h.

00043 { }


Member Function Documentation

ACE_Time_Value OpenDDS::DCPS::NakWatchdog::next_interval (  )  [protected, virtual]

Implements OpenDDS::DCPS::DataLinkWatchdog.

Definition at line 37 of file ReliableSession.cpp.

References OpenDDS::DCPS::MulticastDataLink::config(), OpenDDS::DCPS::MulticastSession::link(), OpenDDS::DCPS::MulticastInst::nak_interval_, and session_.

00038 {
00039   ACE_Time_Value interval(this->session_->link()->config().nak_interval_);
00040 
00041   // Apply random backoff to minimize potential collisions:
00042   interval *= static_cast<double>(std::rand()) /
00043               static_cast<double>(RAND_MAX) + 1.0;
00044 
00045   return interval;
00046 }

Here is the call graph for this function:

void OpenDDS::DCPS::NakWatchdog::on_interval ( const void *  arg  )  [protected, virtual]

Implements OpenDDS::DCPS::DataLinkWatchdog.

Definition at line 49 of file ReliableSession.cpp.

References OpenDDS::DCPS::ReliableSession::expire_naks(), OpenDDS::DCPS::ReliableSession::send_naks(), and session_.

00050 {
00051   // Expire outstanding repair requests that have not yet been
00052   // fulfilled; this prevents NAK implosions due to remote
00053   // peers becoming unresponsive:
00054   this->session_->expire_naks();
00055 
00056   // Initiate repairs by sending MULTICAST_NAK control samples
00057   // to remote peers from which we are missing data:
00058   this->session_->send_naks();
00059 }

Here is the call graph for this function:

bool OpenDDS::DCPS::NakWatchdog::reactor_is_shut_down (  )  const [virtual]

Implements OpenDDS::DCPS::ReactorInterceptor.

Definition at line 77 of file ReliableSession.cpp.

References OpenDDS::DCPS::TransportImpl::is_shut_down(), OpenDDS::DCPS::MulticastSession::link(), session_, and OpenDDS::DCPS::MulticastDataLink::transport().

00078 {
00079   return session_->link()->transport().is_shut_down();
00080 }

Here is the call graph for this function:


Member Data Documentation

Definition at line 44 of file ReliableSession.h.

Referenced by next_interval(), on_interval(), and reactor_is_shut_down().


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