Flushing_Strategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Flushing_Strategy.h
00006  *
00007  *  Flushing_Strategy.h,v 1.10 2005/11/24 11:05:45 ossama 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/orbconf.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025 class ACE_Time_Value;
00026 ACE_END_VERSIONED_NAMESPACE_DECL
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 class TAO_Transport;
00031 class TAO_Queued_Message;
00032 
00033 /**
00034  * @class TAO_Flushing_Strategy
00035  *
00036  * @brief Define the interface for the flushing strategy, i.e. the
00037  *        algorithm that controls how does the ORB flush outgoing
00038  *        data.
00039  *
00040  * Please read the documentation in the TAO_Transport class to find
00041  * out more about the design of the outgoing data path.
00042  *
00043  * Some applications can block the current thread whenever they are
00044  * sending out data.  In those cases they can obtain better
00045  * performance by blocking in calls to write() than by participating
00046  * in the Leader/Followers protocol to shared the ORB Reactor.
00047  *
00048  * This strategy controls how does the ORB schedule and cancel
00049  * reactive I/O, if there is no reactive I/O the strategy is just a
00050  * no-op.
00051  *
00052  */
00053 class TAO_Flushing_Strategy
00054 {
00055 public:
00056   /// Destructor
00057   virtual ~TAO_Flushing_Strategy (void);
00058 
00059   /// Schedule the transport argument to be flushed
00060   virtual int schedule_output (TAO_Transport *transport) = 0;
00061 
00062   /// Cancel all scheduled output for the transport argument
00063   virtual int cancel_output (TAO_Transport *transport) = 0;
00064 
00065   /// Wait until msg is sent out.  Potentially other messages are
00066   /// flushed too, for example, because there are ahead in the queue.
00067   virtual int flush_message (TAO_Transport *transport,
00068                              TAO_Queued_Message *msg,
00069                              ACE_Time_Value *max_wait_time) = 0;
00070 
00071   /// Wait until the transport has no messages queued.
00072   virtual int flush_transport (TAO_Transport *transport) = 0;
00073 };
00074 
00075 TAO_END_VERSIONED_NAMESPACE_DECL
00076 
00077 #include /**/ "ace/post.h"
00078 
00079 #endif  /* TAO_FLUSHING_STRATEGY_H */

Generated on Thu Nov 9 11:54:11 2006 for TAO by doxygen 1.3.6