diff options
| author | Gordon Sim <gsim@apache.org> | 2008-05-13 21:38:28 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-05-13 21:38:28 +0000 |
| commit | 7e6635d7e297f6ecf2199028da573bc10437f3ae (patch) | |
| tree | 7e6ffe5b0d89cd1d496578a6f13a8184849abd33 /cpp/src/qpid/broker/RecoveryManagerImpl.cpp | |
| parent | c36a80f0b03bea42bca570e994d08613b08fd6dd (diff) | |
| download | qpid-python-7e6635d7e297f6ecf2199028da573bc10437f3ae.tar.gz | |
QPID-990: Patch from Ted Ross to enable persisting of inter-broker routing entities
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@656023 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/RecoveryManagerImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index 0f8c29f3b9..7fc2b6c4f3 100644 --- a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -23,6 +23,7 @@ #include "Message.h" #include "Queue.h" #include "Link.h" +#include "Bridge.h" #include "RecoveredEnqueue.h" #include "RecoveredDequeue.h" #include "qpid/framing/reply_exceptions.h" @@ -85,10 +86,11 @@ public: class RecoverableConfigImpl : public RecoverableConfig { - // TODO: Add links for other config types, consider using super class (PersistableConfig?) - Link::shared_ptr link; + Link::shared_ptr link; + Bridge::shared_ptr bridge; public: - RecoverableConfigImpl(Link::shared_ptr _link) : link(_link) {} + RecoverableConfigImpl(Link::shared_ptr _link) : link(_link) {} + RecoverableConfigImpl(Bridge::shared_ptr _bridge) : bridge(_bridge) {} void setPersistenceId(uint64_t id); }; @@ -140,10 +142,10 @@ RecoverableConfig::shared_ptr RecoveryManagerImpl::recoverConfig(framing::Buffer string kind; buffer.getShortString (kind); - if (kind == "link") - { + if (kind == "link") return RecoverableConfig::shared_ptr(new RecoverableConfigImpl(Link::decode (links, buffer))); - } + else if (kind == "bridge") + return RecoverableConfig::shared_ptr(new RecoverableConfigImpl(Bridge::decode (links, buffer))); return RecoverableConfig::shared_ptr(); // TODO: raise an exception instead } @@ -212,7 +214,8 @@ void RecoverableConfigImpl::setPersistenceId(uint64_t id) { if (link.get()) link->setPersistenceId(id); - // TODO: add calls to other types. Consider using a parent class. + else if (bridge.get()) + bridge->setPersistenceId(id); } void RecoverableExchangeImpl::bind(string& queueName, string& key, framing::FieldTable& args) |
