summaryrefslogtreecommitdiff
path: root/TAO/tao/Invocation_Retry_Params.h
blob: 659ad4f765536b3d4f9a15406ba2973b26350dfd (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
/* -*- C++ -*- $Id$ */
//=============================================================================
/**
 *  @file   Invocation_Retry_Params.h
 *
 *  $Id$
 *
 *  @author Byron Harris (harrisb@ociweb.com)
 */
//=============================================================================

#ifndef TAO_INVOCATION_RETRY_PARAMS_H
#define TAO_INVOCATION_RETRY_PARAMS_H

#include "tao/orbconf.h"
#include "ace/Array_Map.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  /**
   * @struct Invocation_Retry_Params
   *
   * @brief Contains the invocation retry parameters used when encountering
   * CORBA exceptions.
   * The parameters can be specified using either the Client_Strategy_Factory
   * service given in the service configuration file or through the command line.
   * Any command line parameter overrides the corresponding option in the service
   * configurator file.
   */
  struct Invocation_Retry_Params
  {
    Invocation_Retry_Params();

    typedef ACE_Array_Map<int, int> exception_limit_map_type;

    /**
     * The maximum number of retry attempts per exception type
     * when exceptions are encountered. The profiles are
     * cycled through during each attempt.
     */
    exception_limit_map_type forward_on_exception_limit_;

    /**
     * The maximum number of times to retry a an invocation
     * if the the connection to the server is closed when
     * trying to get a reply.
     */
    int forward_on_reply_closed_limit_;

    /**
     * The delay to use between cycles of base and forward profiles.
     */
    ACE_Time_Value init_retry_delay_;
  };
}

TAO_END_VERSIONED_NAMESPACE_DECL

#endif /* TAO_INVOCATION_RETRY_PARAMS_H*/