ReconnectDelayStrategy is called by AMPS::HAClient to determine how long to wait between attempts to connect or reconnect to a server.
More...
#include <ReconnectDelayStrategy.hpp>
ReconnectDelayStrategy is called by AMPS::HAClient to determine how long to wait between attempts to connect or reconnect to a server.
The class is implemented as a handle that reference counts an instance of AMPS::ReconnectDelayStrategyImpl.
AMPS::ReconnectDelayStrategy::ReconnectDelayStrategy |
( |
| ) |
|
|
inline |
unsigned int AMPS::ReconnectDelayStrategy::getConnectWaitDuration |
( |
const std::string & |
uri_ | ) |
|
|
inline |
Returns the time that the client should delay before connecting to the given server URI.
- Parameters
-
uri_ | The URI which the client plans to connect. |
- Returns
- The time, in milliseconds, which the client should delay before connecting to uri_.
- Exceptions
-
Any | exception thrown indicates no connection should be attempted; the client should in essence "give up." |
void AMPS::ReconnectDelayStrategy::reset |
( |
void |
| ) |
|
|
inline |
Reset the state of this reconnect delay.
AMPS calls this method when a connection is successfully established.
The documentation for this class was generated from the following file: