OpenDDS::DCPS::ThreadSynchResource Class Reference

#include <ThreadSynchResource.h>

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

List of all members.

Public Member Functions

virtual ~ThreadSynchResource ()
virtual int wait_to_unclog ()
void set_handle (ACE_HANDLE handle)

Protected Member Functions

virtual void notify_lost_on_backpressure_timeout ()=0
 ThreadSynchResource ()

Protected Attributes

ACE_HANDLE handle_
ACE_Time_Valuetimeout_

Detailed Description

Definition at line 19 of file ThreadSynchResource.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::ThreadSynchResource::~ThreadSynchResource (  )  [virtual]

Definition at line 15 of file ThreadSynchResource.cpp.

References DBG_ENTRY_LVL, and timeout_.

00016 {
00017   DBG_ENTRY_LVL("ThreadSynchResource","~ThreadSynchResource",6);
00018   delete this->timeout_;
00019 }

ACE_INLINE OpenDDS::DCPS::ThreadSynchResource::ThreadSynchResource (  )  [protected]

Definition at line 12 of file ThreadSynchResource.inl.

References DBG_ENTRY_LVL.

00013   : handle_(ACE_INVALID_HANDLE)
00014   , timeout_(0)
00015 {
00016   DBG_ENTRY_LVL("ThreadSynchResource","ThreadSynchResource",6);
00017 }


Member Function Documentation

virtual void OpenDDS::DCPS::ThreadSynchResource::notify_lost_on_backpressure_timeout (  )  [protected, pure virtual]

Implemented in OpenDDS::DCPS::TcpSynchResource.

Referenced by wait_to_unclog().

Here is the caller graph for this function:

ACE_INLINE void OpenDDS::DCPS::ThreadSynchResource::set_handle ( ACE_HANDLE  handle  ) 

Definition at line 42 of file ThreadSynchResource.inl.

References handle_.

00043 {
00044   handle_ = handle;
00045 }

ACE_INLINE int OpenDDS::DCPS::ThreadSynchResource::wait_to_unclog (  )  [virtual]

Definition at line 20 of file ThreadSynchResource.inl.

References ACE_TEXT(), DBG_ENTRY_LVL, handle_, ACE::handle_write_ready(), LM_ERROR, notify_lost_on_backpressure_timeout(), and timeout_.

00021 {
00022   DBG_ENTRY_LVL("ThreadSynchResource","wait_to_unclog",6);
00023 
00024   if (ACE::handle_write_ready(this->handle_, this->timeout_) == -1) {
00025     if (errno == ETIME) {
00026       ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: handle_write_ready timed out\n"));
00027       this->notify_lost_on_backpressure_timeout();
00028 
00029     } else {
00030       ACE_ERROR((LM_ERROR,
00031                  "(%P|%t) ERROR: ACE::handle_write_ready return -1 while waiting "
00032                  " to unclog. %p \n", ACE_TEXT("handle_write_ready")));
00033     }
00034 
00035     return -1;
00036   }
00037 
00038   return 0;
00039 }

Here is the call graph for this function:


Member Data Documentation

Definition at line 32 of file ThreadSynchResource.h.

Referenced by set_handle(), and wait_to_unclog().


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