![]() |
Kea
1.5.0
|
Warehouses DB reconnect control values. More...
#include <database_connection.h>
Public Member Functions | |
| ReconnectCtl (const std::string &backend_type, unsigned int max_retries, unsigned int retry_interval) | |
| Constructor. More... | |
| std::string | backendType () const |
| Returns the type of the caller backend. More... | |
| bool | checkRetries () |
| Decrements the number of retries remaining. More... | |
| unsigned int | maxRetries () |
| Returns the maximum number for retries allowed. More... | |
| unsigned int | retriesLeft () |
| Returns the number for retries remaining. More... | |
| unsigned int | retryInterval () |
| Returns the amount of time to wait between reconnect attempts. More... | |
Warehouses DB reconnect control values.
When a DatabaseConnection loses connectivity to its backend, it creates an instance of this class based on its configuration parameters and passes the instance into connection's DB lost callback. This allows the layer(s) above the connection to know how to proceed.
Definition at line 76 of file database_connection.h.
|
inline |
Constructor.
| backend_type | type of the caller backend. |
| max_retries | maximum number of reconnect attempts to make |
| retry_interval | amount of time to between reconnect attempts |
Definition at line 82 of file database_connection.h.
|
inline |
Returns the type of the caller backend.
Definition at line 88 of file database_connection.h.
|
inline |
Decrements the number of retries remaining.
Each call decrements the number of retries by one until zero is reached.
Definition at line 96 of file database_connection.h.
|
inline |
Returns the maximum number for retries allowed.
Definition at line 101 of file database_connection.h.
|
inline |
Returns the number for retries remaining.
Definition at line 106 of file database_connection.h.
|
inline |
Returns the amount of time to wait between reconnect attempts.
Definition at line 111 of file database_connection.h.