Mercurial > hg > orthanc-databases
comparison Framework/MySQL/MySQLParameters.h @ 141:0b3e9ee53c46
Added 'MaximumConnectionRetries' & 'ConnectionRetryInterval' to configure the retries when connecting to the DB at startup
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 03 Feb 2020 22:29:51 +0100 |
parents | 4cd7e45b671e |
children | 063aa53b5917 |
comparison
equal
deleted
inserted
replaced
140:4cd7e45b671e | 141:0b3e9ee53c46 |
---|---|
37 std::string password_; | 37 std::string password_; |
38 std::string database_; | 38 std::string database_; |
39 uint16_t port_; | 39 uint16_t port_; |
40 std::string unixSocket_; | 40 std::string unixSocket_; |
41 bool lock_; | 41 bool lock_; |
42 unsigned int maxConnectionRetries_; | |
43 unsigned int connectionRetryInterval_; | |
42 | 44 |
43 void Reset(); | 45 void Reset(); |
44 | 46 |
45 public: | 47 public: |
46 MySQLParameters(); | 48 MySQLParameters(); |
97 bool HasLock() const | 99 bool HasLock() const |
98 { | 100 { |
99 return lock_; | 101 return lock_; |
100 } | 102 } |
101 | 103 |
104 unsigned int GetMaxConnectionRetries() const | |
105 { | |
106 return maxConnectionRetries_; | |
107 } | |
108 | |
109 unsigned int GetConnectionRetryInterval() const | |
110 { | |
111 return connectionRetryInterval_; | |
112 } | |
113 | |
102 void Format(Json::Value& target) const; | 114 void Format(Json::Value& target) const; |
103 }; | 115 }; |
104 } | 116 } |