diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-10-30 22:30:34 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-10-30 22:30:34 +0000 |
| commit | d2268eb77c2ed16f22be333ce2f7cf11027f9a9b (patch) | |
| tree | 5f90d9dfa5e040ada4e48e26d1f73728af02e54b /cpp/src/qpid/broker/RecoveryManagerImpl.cpp | |
| parent | 6fa6fd99a004c98533f533dc52933c3cbc3c2674 (diff) | |
| download | qpid-python-d2268eb77c2ed16f22be333ce2f7cf11027f9a9b.tar.gz | |
In broker, change RecoverableExchange[Impl]::bind() strings to const; they are never changed, and are only passed on to other methods that expect const strings. Makes it easier to work with from store.
In SQL store, fix the deletion of multiple bindings at once. Also, change the tblBinding table to store queue persistenceIds instead of names. Helps keep referential integrity with the queue table. Restoring bindings then just needs to look up the queue name from its ID before restoring each binding.
Fixes QPID-2169, and probably QPID-2170.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@831476 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/RecoveryManagerImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index 9c3a2b5571..0369fcd71d 100644 --- a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -78,7 +78,7 @@ class RecoverableExchangeImpl : public RecoverableExchange public: RecoverableExchangeImpl(Exchange::shared_ptr _exchange, QueueRegistry& _queues) : exchange(_exchange), queues(_queues) {} void setPersistenceId(uint64_t id); - void bind(std::string& queue, std::string& routingKey, qpid::framing::FieldTable& args); + void bind(const std::string& queue, const std::string& routingKey, qpid::framing::FieldTable& args); }; class RecoverableConfigImpl : public RecoverableConfig @@ -230,7 +230,9 @@ void RecoverableConfigImpl::setPersistenceId(uint64_t id) bridge->setPersistenceId(id); } -void RecoverableExchangeImpl::bind(string& queueName, string& key, framing::FieldTable& args) +void RecoverableExchangeImpl::bind(const string& queueName, + const string& key, + framing::FieldTable& args) { Queue::shared_ptr queue = queues.find(queueName); exchange->bind(queue, key, &args); |
