summaryrefslogtreecommitdiff
path: root/TAO/tao/Sync_Strategies.h
blob: 028fa194df2306188f2b9c59e8ee9c766fcbca62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// -*- C++ -*-
// $Id$


// ============================================================================
//
// = LIBRARY
//    TAO
//
// = FILENAME
//    Sync_Strategies.h
//
// = DESCRIPTION
//     Sync Strategies for the ORB Messaging layer.
//
// = AUTHOR
//     Irfan Pyarali
//
// ============================================================================

#ifndef TAO_SYNC_STRATEGIES_H
#define TAO_SYNC_STRATEGIES_H

#include "tao/corbafwd.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/Pluggable.h"
#include "tao/TAOC.h"

class TAO_Export TAO_Sync_Strategy
{
public:
  virtual ~TAO_Sync_Strategy (void);

  virtual ssize_t send (TAO_Transport &transport,
                        TAO_Stub &stub,
                        const ACE_Message_Block *message_block,
                        const ACE_Time_Value *max_wait_time) = 0;
};

class TAO_Export TAO_Transport_Sync_Strategy : public TAO_Sync_Strategy
{
public:
  ssize_t send (TAO_Transport &transport,
                TAO_Stub &stub,
                const ACE_Message_Block *message_block,
                const ACE_Time_Value *max_wait_time);
};

#if (TAO_HAS_CORBA_MESSAGING == 1)

class TAO_Export TAO_None_Sync_Strategy : public TAO_Sync_Strategy
{
public:
  ssize_t send (TAO_Transport &transport,
                TAO_Stub &stub,
                const ACE_Message_Block *message_block,
                const ACE_Time_Value *max_wait_time);

  virtual int buffering_constraints_reached (TAO_Transport &transport,
                                             TAO_Stub &stub,
                                             TAO_Transport_Buffering_Queue &buffering_queue);

  void timer_check (TAO_Transport &transport,
                    const TAO::BufferingConstraint &buffering_constraint);

  ACE_Time_Value time_conversion (const TimeBase::TimeT &time);
};

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */

#if defined (__ACE_INLINE__)
# include "tao/Sync_Strategies.i"
#endif /* __ACE_INLINE__ */

#endif /* TAO_SYNC_STRATEGIES_H */