OpenDDS
Snapshot(2023/04/07-19:43)
|
event handler used to enable and disable output processing. More...
#include <ScheduleOutputHandler.h>
Public Member Functions | |
ScheduleOutputHandler (TransportSendStrategy *strategy, ACE_Reactor *reactor) | |
Construct with the reactor and strategy. More... | |
void | schedule_output () |
Update output processing in the reactor. More... | |
ACE_Event_Handler methods | |
virtual int | handle_exception (ACE_HANDLE) |
modify the reactor mask for the handle. More... | |
![]() | |
virtual | ~ACE_Event_Handler (void) |
virtual ACE_HANDLE | get_handle (void) const |
virtual void | set_handle (ACE_HANDLE) |
virtual int | priority (void) const |
virtual void | priority (int priority) |
virtual int | handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_timeout (const ACE_Time_Value ¤t_time, const void *act=0) |
virtual int | handle_exit (ACE_Process *) |
virtual int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) |
virtual int | handle_signal (int signum, siginfo_t *=0, ucontext_t *=0) |
virtual int | resume_handler (void) |
virtual int | handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual int | handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual void | reactor (ACE_Reactor *reactor) |
virtual ACE_Reactor * | reactor (void) const |
virtual ACE_Reactor_Timer_Interface * | reactor_timer_interface (void) const |
virtual Reference_Count | add_reference (void) |
virtual Reference_Count | remove_reference (void) |
Reference_Counting_Policy & | reference_counting_policy (void) |
Private Types | |
enum | HandlerState { Disabled, Enabled } |
Cache the state that we have set the reactor into. More... | |
Private Attributes | |
TransportSendStrategy * | strategy_ |
Strategy sending data to be scheduled (or not). More... | |
HandlerState | state_ |
event handler used to enable and disable output processing.
This class implements a simple notification handler that is used to schedule or cancel output processing for queued data according to the current mode state of the TransportSendStrategy. If the send strategy is queueing data, then the reactor is enabled to process on output events. Otherwise the output processing callbacks are cancelled.
Definition at line 32 of file ScheduleOutputHandler.h.
|
private |
Cache the state that we have set the reactor into.
Enumerator | |
---|---|
Disabled | |
Enabled |
Definition at line 53 of file ScheduleOutputHandler.h.
ACE_INLINE OpenDDS::DCPS::ScheduleOutputHandler::ScheduleOutputHandler | ( | TransportSendStrategy * | strategy, |
ACE_Reactor * | reactor | ||
) |
Construct with the reactor and strategy.
Definition at line 12 of file ScheduleOutputHandler.inl.
References DBG_ENTRY_LVL, ACE_Event_Handler::Reference_Counting_Policy::ENABLED, ACE_Event_Handler::reference_counting_policy(), and ACE_Event_Handler::Reference_Counting_Policy::value().
|
virtual |
modify the reactor mask for the handle.
Reimplemented from ACE_Event_Handler.
Definition at line 38 of file ScheduleOutputHandler.cpp.
References ACE_DEBUG, ACE_TEXT(), ACE_Reactor::cancel_wakeup(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, Disabled, Enabled, OpenDDS::DCPS::TransportSendStrategy::get_handle(), OpenDDS::DCPS::ThreadSynchWorker::id(), LM_DEBUG, OpenDDS::DCPS::TransportSendStrategy::mode(), OpenDDS::DCPS::TransportSendStrategy::MODE_DIRECT, OpenDDS::DCPS::TransportSendStrategy::MODE_QUEUE, OpenDDS::DCPS::TransportSendStrategy::MODE_SUSPEND, ACE_Event_Handler::reactor(), ACE_Event_Handler::reference_count_, ACE_Reactor::schedule_wakeup(), state_, strategy_, TheServiceParticipant, and ACE_Event_Handler::WRITE_MASK.
void OpenDDS::DCPS::ScheduleOutputHandler::schedule_output | ( | ) |
Update output processing in the reactor.
Filter the notifications here to reduce load.
Definition at line 19 of file ScheduleOutputHandler.cpp.
References DBG_ENTRY_LVL, Disabled, Enabled, OpenDDS::DCPS::TransportSendStrategy::mode(), OpenDDS::DCPS::TransportSendStrategy::MODE_DIRECT, OpenDDS::DCPS::TransportSendStrategy::MODE_QUEUE, OpenDDS::DCPS::TransportSendStrategy::MODE_SUSPEND, ACE_Reactor::notify(), ACE_Event_Handler::reactor(), ACE_Event_Handler::reference_count_, state_, and strategy_.
Referenced by OpenDDS::DCPS::ReactorSynch::work_available().
|
private |
Definition at line 54 of file ScheduleOutputHandler.h.
Referenced by handle_exception(), and schedule_output().
|
private |
Strategy sending data to be scheduled (or not).
Definition at line 50 of file ScheduleOutputHandler.h.
Referenced by handle_exception(), and schedule_output().