OpenDDS::DCPS::ReactorSynchStrategy Class Reference

strategy to construct ReactorSynch implementations of ThreadSynch. More...

#include <ReactorSynchStrategy.h>

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

List of all members.

Public Member Functions

 ReactorSynchStrategy (TransportSendStrategy *strategy, ACE_Reactor *reactor)
virtual ~ReactorSynchStrategy ()
virtual ThreadSynchcreate_synch_object (ThreadSynchResource *synch_resource, long priority=0, int scheduler=0)

Private Attributes

TransportSendStrategystrategy_
ACE_Reactorreactor_

Detailed Description

strategy to construct ReactorSynch implementations of ThreadSynch.

This class is used as a factory for ReactorSynch objects that can be used to scheduled queued output for processing on a reactor. The initial implementation will share the Transport reactor for all of the sending and receiving processing to be performed. If the reactor is upgraded to a thread pool reactor, then this processing can be split between those threads using the default leader-follower dispatching.

The usage idiom for ThreadSynchStrategy ensures that his object will have valid raw pointer values during its lifetime.

Definition at line 39 of file ReactorSynchStrategy.h.


Constructor & Destructor Documentation

ACE_INLINE OpenDDS::DCPS::ReactorSynchStrategy::ReactorSynchStrategy ( TransportSendStrategy strategy,
ACE_Reactor reactor 
)

Construct with strategy, reactor, and handle to configure the ReactorSynch with.

Definition at line 11 of file ReactorSynchStrategy.inl.

References DBG_ENTRY_LVL.

00015  : strategy_( strategy),
00016    reactor_( reactor)
00017 {
00018   DBG_ENTRY_LVL("ReactorSynchStrategy","ReactorSynchStrategy",6);
00019 }

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

Definition at line 16 of file ReactorSynchStrategy.cpp.

References DBG_ENTRY_LVL.

00017 {
00018   DBG_ENTRY_LVL("ReactorSynchStrategy","~ReactorSynchStrategy",6);
00019 }


Member Function Documentation

OpenDDS::DCPS::ThreadSynch * OpenDDS::DCPS::ReactorSynchStrategy::create_synch_object ( ThreadSynchResource synch_resource,
long  priority = 0,
int  scheduler = 0 
) [virtual]

Implements OpenDDS::DCPS::ThreadSynchStrategy.

Definition at line 22 of file ReactorSynchStrategy.cpp.

References DBG_ENTRY_LVL, reactor_, and strategy_.

00024 {
00025   DBG_ENTRY_LVL("ReactorSynchStrategy","create_synch_object",6);
00026   return new ReactorSynch(
00027                synch_resource, strategy_, reactor_);
00028 }


Member Data Documentation

Raw pointer to reactor. This is ok since the strategy will pass the pointer on to the ReactorSynch, which is guaranteed to span the lifetime of both the strategy and the reactor.

Definition at line 63 of file ReactorSynchStrategy.h.

Referenced by create_synch_object().

Raw pointer to the strategy. This is the strategy that contains the TreadSynch (which will receive this pointer) so the lifetime is assured.

Definition at line 58 of file ReactorSynchStrategy.h.

Referenced by create_synch_object().


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