summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/EC_Defaults.h
blob: 7dc1b4a323786024b46da3e6f92b43530e29fba5 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* -*- C++ -*- */
/**
 *  @file   EC_Defaults.h
 *
 *  $Id$
 *
 * In this file we set the compile time defaults for the event
 * channel.
 *
 *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
 *
 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
 * other members of the DOC group. More details can be found in:
 *
 * http://doc.ece.uci.edu/~coryan/EC/index.html
 */

#ifndef TAO_EC_DEFAULTS_H
#define TAO_EC_DEFAULTS_H
#include "ace/pre.h"

#ifndef TAO_EC_ENABLE_DEBUG_MESSAGES
#define TAO_EC_ENABLE_DEBUG_MESSAGES 0
#endif /* TAO_EC_ENABLE_DEBUG_MESSAGES */

// Any of the definitions below can be overriden in the config.h file
// or the compilation line.

// Control consumer and supplier reconnections
#ifndef  TAO_EC_DEFAULT_CONSUMER_RECONNECT
# define TAO_EC_DEFAULT_CONSUMER_RECONNECT 0
#endif /*  TAO_EC_DEFAULT_CONSUMER_RECONNECT */

#ifndef TAO_EC_DEFAULT_SUPPLIER_RECONNECT
#define TAO_EC_DEFAULT_SUPPLIER_RECONNECT 0
#endif /* TAO_EC_DEFAULT_SUPPLIER_RECONNECT */

// Control callbacks when proxies are disconnected
#ifndef TAO_EC_DEFAULT_DISCONNECT_CALLBACKS
# define TAO_EC_DEFAULT_DISCONNECT_CALLBACKS 0
#endif /* TAO_EC_DEFAULT_DISCONNECT_CALLBACKS */

// Control the maximum degree of concurrency tolerated by the EC, some
// kind of limit is required to avoid starvation of delayed write
// operations.
#ifndef TAO_EC_DEFAULT_BUSY_HWM
# define TAO_EC_DEFAULT_BUSY_HWM 1024
#endif /* TAO_EC_DEFAULT_BUSY_HWM */

#ifndef TAO_EC_DEFAULT_MAX_WRITE_DELAY
# define TAO_EC_DEFAULT_MAX_WRITE_DELAY 2048
#endif /* TAO_EC_DEFAULT_MAX_WRITE_DELAY */

// The defaults for the default factory.
// The TAO_EC_Default_Factory is a run-time configurable factory for
// the event channel.  Using the service configurator the user can
// specify what strategies should the factory produce.
// This macros control the default values for those strategies.
//
#ifndef TAO_EC_DEFAULT_DISPATCHING
# define TAO_EC_DEFAULT_DISPATCHING 0         /* reactive */
#endif /* TAO_EC_DEFAULT_DISPATCHING */

#ifndef TAO_EC_DEFAULT_CONSUMER_FILTER
# define TAO_EC_DEFAULT_CONSUMER_FILTER 1     /* type, disj. conj. timers */
#endif /* TAO_EC_DEFAULT_CONSUMER_FILTER */

#ifndef TAO_EC_DEFAULT_SUPPLIER_FILTER
# define TAO_EC_DEFAULT_SUPPLIER_FILTER 1     /* per supplier */
#endif /* TAO_EC_DEFAULT_SUPPLIER_FILTER */

#ifndef TAO_EC_DEFAULT_TIMEOUT
# define TAO_EC_DEFAULT_TIMEOUT 0             /* reactive */
#endif /* TAO_EC_DEFAULT_TIMEOUT */

#ifndef TAO_EC_DEFAULT_OBSERVER
# define TAO_EC_DEFAULT_OBSERVER 0            /* null */
#endif /* TAO_EC_DEFAULT_OBSERVER */

#ifndef TAO_EC_DEFAULT_SCHEDULING
# define TAO_EC_DEFAULT_SCHEDULING 0          /* null */
#endif /* TAO_EC_DEFAULT_SCHEDULING */

#ifndef TAO_EC_DEFAULT_CONSUMER_COLLECTION
# define TAO_EC_DEFAULT_CONSUMER_COLLECTION 0x001 /* copy-on-read MT-safe */
#endif /* TAO_EC_DEFAULT_CONSUMER_COLLECTION */

#ifndef TAO_EC_DEFAULT_SUPPLIER_COLLECTION
# define TAO_EC_DEFAULT_SUPPLIER_COLLECTION 0x001 /* copy-on-read MT-safe */
#endif /* TAO_EC_DEFAULT_SUPPLIER_COLLECTION */

#ifndef TAO_EC_DEFAULT_CONSUMER_LOCK
# define TAO_EC_DEFAULT_CONSUMER_LOCK 1       /* thread */
#endif /* TAO_EC_DEFAULT_CONSUMER_LOCK */

#ifndef TAO_EC_DEFAULT_SUPPLIER_LOCK
# define TAO_EC_DEFAULT_SUPPLIER_LOCK 1       /* thread */
#endif /* TAO_EC_DEFAULT_SUPPLIER_LOCK */

#ifndef TAO_EC_DEFAULT_DISPATCHING_THREADS
# define TAO_EC_DEFAULT_DISPATCHING_THREADS 1 /* */
#endif /* TAO_EC_DEFAULT_DISPATCHING_THREADS */

#ifndef TAO_EC_DEFAULT_DISPATCHING_THREADS_FLAGS
# define TAO_EC_DEFAULT_DISPATCHING_THREADS_FLAGS THR_NEW_LWP|THR_SCHED_FIFO
#endif /* TAO_EC_DEFAULT_DISPATCHING_THREADS */

#ifndef TAO_EC_DEFAULT_DISPATCHING_THREADS_PRIORITY
# define TAO_EC_DEFAULT_DISPATCHING_THREADS_PRIORITY 0 /* */
#endif /* TAO_EC_DEFAULT_DISPATCHING_THREADS_PRIORITY */

#ifndef TAO_EC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE
# define TAO_EC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE 1
#endif /* TAO_EC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE */

#ifndef TAO_EC_DEFAULT_ORB_ID
# define TAO_EC_DEFAULT_ORB_ID "" /* */
#endif /* TAO_EC_DEFAULT_ORB_ID */

#ifndef TAO_EC_DEFAULT_CONSUMER_CONTROL
# define TAO_EC_DEFAULT_CONSUMER_CONTROL 0 /* null */
#endif /* TAO_EC_DEFAULT_CONSUMER_CONTROL */

#ifndef TAO_EC_DEFAULT_SUPPLIER_CONTROL
# define TAO_EC_DEFAULT_SUPPLIER_CONTROL 0 /* null */
#endif /* TAO_EC_DEFAULT_SUPPLIER_CONTROL */

#ifndef TAO_EC_DEFAULT_CONSUMER_CONTROL_PERIOD
# define TAO_EC_DEFAULT_CONSUMER_CONTROL_PERIOD 5000000 /* usecs */
#endif /* TAO_EC_DEFAULT_CONSUMER_CONTROL_PERIOD */

#ifndef TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD
# define TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD 5000000 /* usecs */
#endif /* TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD */

#ifndef TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT
# define TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT 10000 /* usecs */
#endif /* TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT */

#ifndef TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT
# define TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT 10000 /* usecs */
#endif /* TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT */

#include "ace/post.h"
#endif /* TAO_EC_DEFAULTS_H */