diff options
author | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
commit | 9c73ef7a5ac10acd6a50d5d52bd721fc2faa5919 (patch) | |
tree | 2a890e1df09e5b896a9b4168a7b22648f559a1f2 /cpp/src/qpid/ha/Settings.h | |
parent | 172d9b2a16cfb817bbe632d050acba7e31401cd2 (diff) | |
download | qpid-python-asyncstore.tar.gz |
Update from trunk r1375509 through r1450773asyncstore
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/ha/Settings.h')
-rw-r--r-- | cpp/src/qpid/ha/Settings.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cpp/src/qpid/ha/Settings.h b/cpp/src/qpid/ha/Settings.h index 37235b5c79..53b61415cf 100644 --- a/cpp/src/qpid/ha/Settings.h +++ b/cpp/src/qpid/ha/Settings.h @@ -23,6 +23,7 @@ */ #include "types.h" +#include "qpid/sys/IntegerTypes.h" #include <string> namespace qpid { @@ -34,16 +35,25 @@ namespace ha { class Settings { public: - Settings() : cluster(false), replicateDefault(NONE), backupTimeout(5) + Settings() : cluster(false), queueReplication(false), + replicateDefault(NONE), backupTimeout(5), + flowMessages(100), flowBytes(0) {} bool cluster; // True if we are a cluster member. - std::string clientUrl; + bool queueReplication; // True if enabled. + std::string publicUrl; std::string brokerUrl; Enum<ReplicateLevel> replicateDefault; std::string username, password, mechanism; double backupTimeout; - private: + + uint32_t flowMessages, flowBytes; + + static const uint32_t NO_LIMIT=0xFFFFFFFF; + static uint32_t flowValue(uint32_t n) { return n ? n : NO_LIMIT; } + uint32_t getFlowMessages() const { return flowValue(flowMessages); } + uint32_t getFlowBytes() const { return flowValue(flowBytes); } }; }} // namespace qpid::ha |