#include <Leader_Follower_Flushing_Strategy.h>
Inheritance diagram for TAO_Leader_Follower_Flushing_Strategy:
Public Member Functions | |
virtual int | schedule_output (TAO_Transport *transport) |
Schedule the transport argument to be flushed. | |
virtual int | cancel_output (TAO_Transport *transport) |
Cancel all scheduled output for the transport argument. | |
virtual int | flush_message (TAO_Transport *transport, TAO_Queued_Message *msg, ACE_Time_Value *max_wait_time) |
virtual int | flush_transport (TAO_Transport *transport) |
Wait until the transport has no messages queued. |
Definition at line 32 of file Leader_Follower_Flushing_Strategy.h.
|
Cancel all scheduled output for the transport argument.
Implements TAO_Flushing_Strategy. Definition at line 24 of file Leader_Follower_Flushing_Strategy.cpp. References TAO_Transport::cancel_output_i().
00027 { 00028 return transport->cancel_output_i (); 00029 } |
|
Wait until msg is sent out. Potentially other messages are flushed too, for example, because there are ahead in the queue. Implements TAO_Flushing_Strategy. Definition at line 32 of file Leader_Follower_Flushing_Strategy.cpp. References TAO_ORB_Core::leader_follower(), TAO_Transport::orb_core(), and TAO_Leader_Follower::wait_for_event().
00037 { 00038 TAO_Leader_Follower &leader_follower = 00039 transport->orb_core ()->leader_follower (); 00040 return leader_follower.wait_for_event (msg, transport, max_wait_time); 00041 } |
|
Wait until the transport has no messages queued.
Implements TAO_Flushing_Strategy. Definition at line 44 of file Leader_Follower_Flushing_Strategy.cpp. References ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, TAO_Transport::orb_core(), TAO_Transport::queue_is_empty(), and TAO_ORB_Core::run().
00047 { 00048 // @todo This is not the right way to do this.... 00049 00050 ACE_DECLARE_NEW_CORBA_ENV; 00051 ACE_TRY 00052 { 00053 TAO_ORB_Core *orb_core = transport->orb_core (); 00054 00055 while (!transport->queue_is_empty ()) 00056 { 00057 int result = orb_core->run (0, 1 ACE_ENV_ARG_PARAMETER); 00058 ACE_TRY_CHECK; 00059 00060 if (result == -1) 00061 return -1; 00062 } 00063 } 00064 ACE_CATCHANY 00065 { 00066 return -1; 00067 } 00068 ACE_ENDTRY; 00069 00070 return 0; 00071 } |
|
Schedule the transport argument to be flushed.
Implements TAO_Flushing_Strategy. Definition at line 18 of file Leader_Follower_Flushing_Strategy.cpp. References TAO_Transport::schedule_output_i().
00019 { 00020 return transport->schedule_output_i (); 00021 } |