Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Leader_Follower_Flushing_Strategy Class Reference

Implement a flushing strategy that uses the Leader/Follower set. More...

#include <Leader_Follower_Flushing_Strategy.h>

Inheritance diagram for TAO_Leader_Follower_Flushing_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Leader_Follower_Flushing_Strategy:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual int schedule_output (TAO_Transport *transport)
 Schedule the transport argument to be flushed. More...

virtual int cancel_output (TAO_Transport *transport)
 Cancel all scheduled output for the transport argument. More...

virtual int flush_message (TAO_Transport *transport, TAO_Queued_Message *msg, ACE_Time_Value *max_wait_time)
 Wait until msg is sent out. Potentially other messages are flushed too, for example, because there are ahead in the queue. More...

virtual int flush_transport (TAO_Transport *transport)
 Wait until the transport has no messages queued. More...


Detailed Description

Implement a flushing strategy that uses the Leader/Follower set.

Definition at line 29 of file Leader_Follower_Flushing_Strategy.h.


Member Function Documentation

int TAO_Leader_Follower_Flushing_Strategy::cancel_output TAO_Transport   transport [virtual]
 

Cancel all scheduled output for the transport argument.

Implements TAO_Flushing_Strategy.

Definition at line 21 of file Leader_Follower_Flushing_Strategy.cpp.

References TAO_Transport::cancel_output_i.

00022 {
00023   return transport->cancel_output_i ();
00024 }

int TAO_Leader_Follower_Flushing_Strategy::flush_message TAO_Transport   transport,
TAO_Queued_Message   msg,
ACE_Time_Value   max_wait_time
[virtual]
 

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 27 of file Leader_Follower_Flushing_Strategy.cpp.

References TAO_ORB_Core::leader_follower, TAO_Transport::orb_core, and TAO_Leader_Follower::wait_for_event.

00030 {
00031   TAO_Leader_Follower &leader_follower =
00032     transport->orb_core ()->leader_follower ();
00033   return leader_follower.wait_for_event (msg, transport, max_wait_time);
00034 }

int TAO_Leader_Follower_Flushing_Strategy::flush_transport TAO_Transport   transport [virtual]
 

Wait until the transport has no messages queued.

Implements TAO_Flushing_Strategy.

Definition at line 37 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.

00038 {
00039   // @todo This is not the right way to do this....
00040 
00041   ACE_DECLARE_NEW_CORBA_ENV;
00042   ACE_TRY
00043     {
00044       TAO_ORB_Core *orb_core = transport->orb_core ();
00045 
00046       while (!transport->queue_is_empty ())
00047         {
00048           int result = orb_core->run (0, 1 ACE_ENV_ARG_PARAMETER);
00049           ACE_TRY_CHECK;
00050 
00051           if (result == -1)
00052             return -1;
00053         }
00054     }
00055   ACE_CATCHANY
00056     {
00057       return -1;
00058     }
00059   ACE_ENDTRY;
00060 
00061   return 0;
00062 }

int TAO_Leader_Follower_Flushing_Strategy::schedule_output TAO_Transport   transport [virtual]
 

Schedule the transport argument to be flushed.

Implements TAO_Flushing_Strategy.

Definition at line 15 of file Leader_Follower_Flushing_Strategy.cpp.

References TAO_Transport::schedule_output_i.

00016 {
00017   return transport->schedule_output_i ();
00018 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:22:49 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002