TAO  2.3.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO::Transport::Drain_Constraints Struct Reference

Encapsulate the flushing control parameters. More...

#include <Transport.h>

Collaboration diagram for TAO::Transport::Drain_Constraints:
Collaboration graph
[legend]

Public Member Functions

 Drain_Constraints ()
 Default constructor. More...
 
 Drain_Constraints (ACE_Time_Value *timeout, bool block_on_io)
 Constructor. More...
 
bool block_on_io () const
 
ACE_Time_Valuetimeout () const
 

Private Member Functions

 Drain_Constraints (const Drain_Constraints &)
 
Drain_Constraintsoperator= (const Drain_Constraints &)
 

Private Attributes

ACE_Time_Valuetimeout_
 
bool block_on_io_
 

Detailed Description

Encapsulate the flushing control parameters.

At several points, the ORB needs to flush data from a transport to the underlying I/O mechanisms. How this data is flushed depends on the context where the request is made, the ORB configuration and the application level policies in effect.

Some examples:

When idle, the ORB will want to send data on any socket that has

space available. In this case, the queue must be drained on a best-effort basis, without any blocking.

If the ORB is configured to handle nested upcalls, any two-way

request should block and push data to the underlying socket as fast as possible.

In the same use-case, but now with a timeout policy in

effect, the ORB will need to send the data use I/O operations with timeouts (as implemented by ACE::sendv()

When the ORB is configured to support nested upcalls, any two-way,

reliable oneway or similar should wait using the reactor or Leader-Follower implementation. While still respecting the timeout policies.

Instead of sprinkling if() statements throughput the critical path trying to determine how the I/O operations should be performed, we pass the information encapsulated in this class. The caller into the Transport object determines the right parameters to use, and the Transport object simply obeys those instructions.

Constructor & Destructor Documentation

TAO::Transport::Drain_Constraints::Drain_Constraints ( )
inline

Default constructor.

TAO::Transport::Drain_Constraints::Drain_Constraints ( ACE_Time_Value timeout,
bool  block_on_io 
)
inline

Constructor.

TAO::Transport::Drain_Constraints::Drain_Constraints ( const Drain_Constraints )
private

Member Function Documentation

bool TAO::Transport::Drain_Constraints::block_on_io ( ) const
inline

If true, then the ORB should block on I/O operations instead of using non-blocking I/O.

Drain_Constraints& TAO::Transport::Drain_Constraints::operator= ( const Drain_Constraints )
private
ACE_Time_Value* TAO::Transport::Drain_Constraints::timeout ( ) const
inline

The maximum time to block on I/O operations (or nested loops) based on the current timeout policies.

Member Data Documentation

bool TAO::Transport::Drain_Constraints::block_on_io_
private
ACE_Time_Value* TAO::Transport::Drain_Constraints::timeout_
private

The documentation for this struct was generated from the following file: