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

Flushing_Strategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Flushing_Strategy.h
00006  *
00007  *  $Id: Flushing_Strategy.h,v 1.1.1.2 2003/02/21 18:36:44 chad Exp $
00008  *
00009  *  @author Carlos O'Ryan <coryan@uci.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_FLUSHING_STRATEGY_H
00014 #define TAO_FLUSHING_STRATEGY_H
00015 
00016 #include "ace/pre.h"
00017 
00018 #include "TAO_Export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 class ACE_Time_Value;
00025 class TAO_Transport;
00026 class TAO_Queued_Message;
00027 
00028 /**
00029  * @class TAO_Flushing_Strategy
00030  *
00031  * @brief Define the interface for the flushing strategy, i.e. the
00032  *        algorithm that controls how does the ORB flush outgoing
00033  *        data.
00034  *
00035  * Please read the documentation in the TAO_Transport class to find
00036  * out more about the design of the outgoing data path.
00037  *
00038  * Some applications can block the current thread whenever they are
00039  * sending out data.  In those cases they can obtain better
00040  * performance by blocking in calls to write() than by participating
00041  * in the Leader/Followers protocol to shared the ORB Reactor.
00042  *
00043  * This strategy controls how does the ORB schedule and cancel
00044  * reactive I/O, if there is no reactive I/O the strategy is just a
00045  * no-op.
00046  *
00047  */
00048 class TAO_Export TAO_Flushing_Strategy
00049 {
00050 public:
00051   /// Destructor
00052   virtual ~TAO_Flushing_Strategy (void);
00053 
00054   /// Schedule the transport argument to be flushed
00055   virtual int schedule_output (TAO_Transport *transport) = 0;
00056 
00057   /// Cancel all scheduled output for the transport argument
00058   virtual int cancel_output (TAO_Transport *transport) = 0;
00059 
00060   /// Wait until msg is sent out.  Potentially other messages are
00061   /// flushed too, for example, because there are ahead in the queue.
00062   virtual int flush_message (TAO_Transport *transport,
00063                              TAO_Queued_Message *msg,
00064                              ACE_Time_Value *max_wait_time) = 0;
00065 
00066   /// Wait until the transport has no messages queued.
00067   virtual int flush_transport (TAO_Transport *transport) = 0;
00068 };
00069 
00070 #include "ace/post.h"
00071 
00072 #endif  /* TAO_FLUSHING_STRATEGY_H */

Generated on Mon Jun 16 13:48:23 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002