Mercurial > hg > orthanc-databases
comparison Framework/PostgreSQL/PostgreSQLParameters.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 |
---|---|
38 std::string password_; | 38 std::string password_; |
39 std::string database_; | 39 std::string database_; |
40 std::string uri_; | 40 std::string uri_; |
41 bool ssl_; | 41 bool ssl_; |
42 bool lock_; | 42 bool lock_; |
43 unsigned int maxConnectionRetries_; | |
44 unsigned int connectionRetryInterval_; | |
43 | 45 |
44 void Reset(); | 46 void Reset(); |
45 | 47 |
46 public: | 48 public: |
47 PostgreSQLParameters(); | 49 PostgreSQLParameters(); |
110 bool HasLock() const | 112 bool HasLock() const |
111 { | 113 { |
112 return lock_; | 114 return lock_; |
113 } | 115 } |
114 | 116 |
117 unsigned int GetMaxConnectionRetries() const | |
118 { | |
119 return maxConnectionRetries_; | |
120 } | |
121 | |
122 unsigned int GetConnectionRetryInterval() const | |
123 { | |
124 return connectionRetryInterval_; | |
125 } | |
126 | |
115 void Format(std::string& target) const; | 127 void Format(std::string& target) const; |
116 }; | 128 }; |
117 } | 129 } |