#include <ReactorSynchStrategy.h>
Inheritance diagram for OpenDDS::DCPS::ReactorSynchStrategy:
Public Member Functions | |
ReactorSynchStrategy (TransportSendStrategy *strategy, ACE_Reactor *reactor) | |
virtual | ~ReactorSynchStrategy () |
virtual ThreadSynch * | create_synch_object (ThreadSynchResource *synch_resource, long priority=0, int scheduler=0) |
Private Attributes | |
TransportSendStrategy * | strategy_ |
ACE_Reactor * | reactor_ |
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 35 of file ReactorSynchStrategy.h.
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 }
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 }
ACE_Reactor* OpenDDS::DCPS::ReactorSynchStrategy::reactor_ [private] |
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 59 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 54 of file ReactorSynchStrategy.h.
Referenced by create_synch_object().