AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.4
|
FixedDelayStrategy is an implementation that delays for a fixed time period, as specified in the constructor, when reconnecting to the same server as we were previously connected to, or if we are invoked again for the first server we ever tried. More...
#include <ReconnectDelayStrategyImpl.hpp>
Public Member Functions | |
FixedDelayStrategy (unsigned int duration_=200, unsigned maximum_=0) | |
Construct a FixedDelayStrategy with a given duration. More... | |
unsigned int | getConnectWaitDuration (const std::string &uri_) |
Returns the time that the client should delay before connecting to the given server URI. More... | |
void | reset (void) |
Reset the state of this reconnect delay. More... | |
FixedDelayStrategy is an implementation that delays for a fixed time period, as specified in the constructor, when reconnecting to the same server as we were previously connected to, or if we are invoked again for the first server we ever tried.
|
inline |
Construct a FixedDelayStrategy with a given duration.
duration_ | The delay (milliseconds) to be used between reconnect attempts to the same server. (defaults to 200ms). |
maximum_ | The maximum time (milliseconds) to retry before giving up. Default is 0, or don't give up. |
|
inlinevirtual |
Returns the time that the client should delay before connecting to the given server URI.
uri_ | The URI which the client plans to connect. |
Any | exception thrown indicates no connection should be attempted; the client should in essence "give up." |
Implements AMPS::ReconnectDelayStrategyImpl.
|
inlinevirtual |
Reset the state of this reconnect delay.
AMPS calls this method when a connection is successfully established.
Implements AMPS::ReconnectDelayStrategyImpl.