diff options
Diffstat (limited to 'cpp/src/qpid/ha/ReplicationTest.h')
-rw-r--r-- | cpp/src/qpid/ha/ReplicationTest.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/cpp/src/qpid/ha/ReplicationTest.h b/cpp/src/qpid/ha/ReplicationTest.h index 9f6976a8e4..7d44d82a21 100644 --- a/cpp/src/qpid/ha/ReplicationTest.h +++ b/cpp/src/qpid/ha/ReplicationTest.h @@ -30,6 +30,7 @@ namespace qpid { namespace broker { class Queue; +class Exchange; } namespace framing { @@ -47,21 +48,24 @@ class ReplicationTest ReplicationTest(ReplicateLevel replicateDefault_) : replicateDefault(replicateDefault_) {} - // Return the simple replication level, accounting for defaults. - ReplicateLevel replicateLevel(const std::string& str); - ReplicateLevel replicateLevel(const framing::FieldTable& f); - ReplicateLevel replicateLevel(const types::Variant::Map& m); + // Get the replication level set on an object, or default if not set. + ReplicateLevel getLevel(const std::string& str); + ReplicateLevel getLevel(const framing::FieldTable& f); + ReplicateLevel getLevel(const types::Variant::Map& m); + ReplicateLevel getLevel(const broker::Queue&); + ReplicateLevel getLevel(const broker::Exchange&); + + // Calculate level for objects that may not have replication set, + // including auto-delete/exclusive settings. + ReplicateLevel useLevel(const types::Variant::Map& args, bool autodelete, bool exclusive); + ReplicateLevel useLevel(const framing::FieldTable& args, bool autodelete, bool exclusive); + ReplicateLevel useLevel(const broker::Queue&); + ReplicateLevel useLevel(const broker::Exchange&); - // Return true if replication for a queue is enabled at level or higher, - // taking account of default level and queue settings. - bool isReplicated(ReplicateLevel level, - const types::Variant::Map& args, bool autodelete, bool exclusive); - bool isReplicated(ReplicateLevel level, - const framing::FieldTable& args, bool autodelete, bool exclusive); - bool isReplicated(ReplicateLevel level, const broker::Queue&); private: ReplicateLevel replicateDefault; }; + }} // namespace qpid::ha #endif /*!QPID_HA_REPLICATIONTEST_H*/ |