#include <Leader_Follower_Flushing_Strategy.h>
Inheritance diagram for TAO_Leader_Follower_Flushing_Strategy:


Public Member Functions | |
| virtual int | schedule_output (TAO_Transport *transport) |
| 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 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 try
00051 {
00052 TAO_ORB_Core * const orb_core = transport->orb_core ();
00053
00054 while (!transport->queue_is_empty ())
00055 {
00056 if (orb_core->run (0, 1) == -1)
00057 return -1;
00058 }
00059 }
00060 catch (const ::CORBA::Exception&)
00061 {
00062 return -1;
00063 }
00064
00065 return 0;
00066 }
|
|
|
Schedule the transport argument to be flushed If -2 is returned then the caller must call one of the flush_* methods. If -1 is returned then there was an error. If 0 is returned then the flush was scheduled successfully. 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 }
|
1.3.6