AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.4
ReconnectDelayStrategy.hpp
Go to the documentation of this file.
1 //
3 // Copyright (c) 2010-2024 60East Technologies Inc., All Rights Reserved.
4 //
5 // This computer software is owned by 60East Technologies Inc. and is
6 // protected by U.S. copyright laws and other laws and by international
7 // treaties. This computer software is furnished by 60East Technologies
8 // Inc. pursuant to a written license agreement and may be used, copied,
9 // transmitted, and stored only in accordance with the terms of such
10 // license agreement and with the inclusion of the above copyright notice.
11 // This computer software or any other copies thereof may not be provided
12 // or otherwise made available to any other person.
13 //
14 // U.S. Government Restricted Rights. This computer software: (a) was
15 // developed at private expense and is in all respects the proprietary
16 // information of 60East Technologies Inc.; (b) was not developed with
17 // government funds; (c) is a trade secret of 60East Technologies Inc.
18 // for all purposes of the Freedom of Information Act; and (d) is a
19 // commercial item and thus, pursuant to Section 12.212 of the Federal
20 // Acquisition Regulations (FAR) and DFAR Supplement Section 227.7202,
21 // Government's use, duplication or disclosure of the computer software
22 // is subject to the restrictions set forth by 60East Technologies Inc..
23 //
25 
26 #ifndef _AMPS_RECONNECTDELAYSTRATEGY_HPP_
27 #define _AMPS_RECONNECTDELAYSTRATEGY_HPP_
28 
29 
30 #include <amps/ReconnectDelayStrategyImpl.hpp>
31 
36 
37 namespace AMPS
38 {
45  {
46  public:
52  : _implPtr(new ExponentialDelayStrategy())
53  {;}
54 
62  : _implPtr(pImpl_)
63  {;}
64 
65 
78  unsigned int getConnectWaitDuration(const std::string& uri_)
79  {
80  return _implPtr->getConnectWaitDuration(uri_);
81  }
82 
87  void reset(void)
88  {
89  _implPtr->reset();
90  }
91 
97  {
98  return &(_implPtr.get());
99  }
100  protected:
101  AMPS::RefHandle<ReconnectDelayStrategyImpl> _implPtr;
102  };
103 }
104 
105 
106 #endif
ExponentialDelayStrategy is an implementation that exponentially "backs off" when reconnecting to the...
Definition: ReconnectDelayStrategyImpl.hpp:77
void reset(void)
Reset the state of this reconnect delay.
Definition: ReconnectDelayStrategy.hpp:87
Base class for ReconnectDelayStrategy implementations.
Definition: ReconnectDelayStrategyImpl.hpp:46
ReconnectDelayStrategy()
Constructs a ReconnectDelayStrategy with a default implementation.
Definition: ReconnectDelayStrategy.hpp:51
ReconnectDelayStrategy is called by AMPS::HAClient to determine how long to wait between attempts to ...
Definition: ReconnectDelayStrategy.hpp:44
unsigned int getConnectWaitDuration(const std::string &uri_)
Returns the time that the client should delay before connecting to the given server URI...
Definition: ReconnectDelayStrategy.hpp:78
ReconnectDelayStrategy(ReconnectDelayStrategyImpl *pImpl_)
Constructs a ReconnectDelayStrategy with a given implementation.
Definition: ReconnectDelayStrategy.hpp:61
Definition: ampsplusplus.hpp:102