summaryrefslogtreecommitdiff
path: root/TAO/tao/Flushing_Strategy.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
commite588f487fe14b34a642a62bd0cb53877a42b4793 (patch)
tree8c0bc2f7aa508472a4fd98dfca9d6afd60130f52 /TAO/tao/Flushing_Strategy.h
parentad7f2d4ae4273710073d841fe5afccaf14e6718a (diff)
downloadATCD-e588f487fe14b34a642a62bd0cb53877a42b4793.tar.gz
ChangeLogTag:Tue Apr 24 00:21:54 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/Flushing_Strategy.h')
-rw-r--r--TAO/tao/Flushing_Strategy.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/TAO/tao/Flushing_Strategy.h b/TAO/tao/Flushing_Strategy.h
new file mode 100644
index 00000000000..0873936ccf4
--- /dev/null
+++ b/TAO/tao/Flushing_Strategy.h
@@ -0,0 +1,69 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Flushing_Strategy.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan <coryan@uci.edu>
+ */
+//=============================================================================
+
+#ifndef TAO_FLUSHING_STRATEGY_H
+#define TAO_FLUSHING_STRATEGY_H
+#include "ace/pre.h"
+
+#include "corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_Transport;
+class TAO_Queued_Message;
+
+/**
+ * @class TAO_Flushing_Strategy
+ *
+ * @brief Define the interface for the flushing strategy, i.e. the
+ * algorithm that controls how does the ORB flush outgoing
+ * data.
+ *
+ * Please read the documentation in the TAO_Transport class to find
+ * out more about the design of the outgoing data path.
+ *
+ * Some applications can block the current thread whenever they are
+ * sending out data. In those cases they can obtain better
+ * performance by blocking in calls to write() than by participating
+ * in the Leader/Followers protocol to shared the ORB Reactor.
+ *
+ * This strategy controls how does the ORB schedule and cancel
+ * reactive I/O, if there is no reactive I/O the strategy is just a
+ * no-op.
+ *
+ */
+class TAO_Export TAO_Flushing_Strategy
+{
+public:
+ /// Destructor
+ virtual ~TAO_Flushing_Strategy (void);
+
+ /// Schedule the transport argument to be flushed
+ virtual int schedule_output (TAO_Transport *transport) = 0;
+
+ /// Cancel all scheduled output for the transport argument
+ virtual int cancel_output (TAO_Transport *transport) = 0;
+
+ /// Wait until msg is sent out. Potentially other messages are
+ /// flushed too, for example, because there are ahead in the queue.
+ virtual int flush_message (TAO_Transport *transport,
+ TAO_Queued_Message *msg,
+ ACE_Time_Value *max_wait_time) = 0;
+
+ /// Wait until the transport has no messages queued.
+ virtual int flush_transport (TAO_Transport *transport) = 0;
+};
+
+#include "ace/post.h"
+#endif /* TAO_FLUSHING_STRATEGY_H */