2 //=============================================================================
4 * @file Invocation_Retry_State.h
6 * @author Byron Harris (harrisb@ociweb.com)
8 //=============================================================================
10 #ifndef TAO_INVOCATION_RETRY_STATE_H
11 #define TAO_INVOCATION_RETRY_STATE_H
14 #include "tao/Invocation_Retry_Params.h"
16 #include "ace/Array_Map.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 * @class Invocation_Retry_State
29 * @brief Maintains state of invocation retries.
31 class Invocation_Retry_State
34 Invocation_Retry_State (TAO_Stub
&stub
);
36 ~Invocation_Retry_State ();
39 * Answer if any profile forward on exception limit
42 bool forward_on_exception_limit_used () const;
45 * Attempt to increment the count of profile
47 * @return false if forward on exception is not
48 * being used or the limit has been reached.
50 bool forward_on_exception_increment (const int ef
);
53 * Attempt to increment the count of retries
54 * when a server connection is seen as closed
57 bool forward_on_reply_closed_increment ();
60 * Increment to next profile in preparation
61 * to retry using that profile.
62 * If the next profile is the starting
63 * base profile then also call
65 * @see TAO_Stub::next_profile_retry()
67 void next_profile_retry (TAO_Stub
&stub
) const;
70 * Sleep if profile is the starting
73 void sleep_at_starting_profile (TAO_Stub
&stub
) const;
76 * Sleep according to the delay value
77 * in Invocation_Retry_Params.
82 typedef ACE_Array_Map
<int, int> Ex_Count_Map
;
83 Ex_Count_Map ex_count_map_
;
84 int forward_on_reply_closed_count_
;
85 Invocation_Retry_Params retry_params_
;
86 bool forward_on_exception_limit_used_
;
90 TAO_END_VERSIONED_NAMESPACE_DECL
92 #endif /* TAO_INVOCATION_RETRY_STATE_H*/