diff options
author | Gordon Sim <gsim@apache.org> | 2007-03-30 15:50:07 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-03-30 15:50:07 +0000 |
commit | 33d8343d134a391fa7d0a338fafad1a22ff58dc3 (patch) | |
tree | 7c8b9ef3ea62852eb38548be87f908b2892e12a2 /cpp/lib/broker/NullMessageStore.cpp | |
parent | 8fc571ee337add8f2c4ab1f1ebc0c4784c58e2bf (diff) | |
download | qpid-python-33d8343d134a391fa7d0a338fafad1a22ff58dc3.tar.gz |
Refactored the MessageStore interface to restrict visibility of broker core from store implementations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@524139 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker/NullMessageStore.cpp')
-rw-r--r-- | cpp/lib/broker/NullMessageStore.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/cpp/lib/broker/NullMessageStore.cpp b/cpp/lib/broker/NullMessageStore.cpp index bcb15c2ae0..0d53a31069 100644 --- a/cpp/lib/broker/NullMessageStore.cpp +++ b/cpp/lib/broker/NullMessageStore.cpp @@ -21,7 +21,6 @@ #include <NullMessageStore.h> -#include <BrokerQueue.h> #include <RecoveryManager.h> #include <iostream> @@ -30,75 +29,77 @@ using namespace qpid::broker; NullMessageStore::NullMessageStore(bool _warn) : warn(_warn){} -void NullMessageStore::create(const Queue& queue, const qpid::framing::FieldTable&) +void NullMessageStore::create(const PersistableQueue& queue) { if (warn) std::cout << "WARNING: Can't create durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::destroy(const Queue& queue) +void NullMessageStore::destroy(const PersistableQueue& queue) { if (warn) std::cout << "WARNING: Can't destroy durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::recover(RecoveryManager&, const MessageStoreSettings* const) +void NullMessageStore::create(const PersistableExchange&) +{ +} + +void NullMessageStore::destroy(const PersistableExchange&) +{ +} + +void NullMessageStore::recover(RecoveryManager&) { if (warn) std::cout << "WARNING: Persistence not enabled, no recovery of queues or messages." << std::endl; } -void NullMessageStore::stage(Message* const) +void NullMessageStore::stage(PersistableMessage&) { if (warn) std::cout << "WARNING: Can't stage message. Persistence not enabled." << std::endl; } -void NullMessageStore::destroy(Message* const) +void NullMessageStore::destroy(PersistableMessage&) { if (warn) std::cout << "WARNING: No need to destroy staged message. Persistence not enabled." << std::endl; } -void NullMessageStore::appendContent(Message* const, const string&) +void NullMessageStore::appendContent(PersistableMessage&, const string&) { if (warn) std::cout << "WARNING: Can't append content. Persistence not enabled." << std::endl; } -void NullMessageStore::loadContent(Message* const, string&, uint64_t, uint32_t) +void NullMessageStore::loadContent(PersistableMessage&, string&, uint64_t, uint32_t) { if (warn) std::cout << "WARNING: Can't load content. Persistence not enabled." << std::endl; } -void NullMessageStore::enqueue(TransactionContext*, Message* const, const Queue& queue, const string * const) +void NullMessageStore::enqueue(TransactionContext*, PersistableMessage&, const PersistableQueue& queue) { if (warn) std::cout << "WARNING: Can't enqueue message onto '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::dequeue(TransactionContext*, Message* const, const Queue& queue, const string * const) +void NullMessageStore::dequeue(TransactionContext*, PersistableMessage&, const PersistableQueue& queue) { if (warn) std::cout << "WARNING: Can't dequeue message from '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::prepared(const string * const) -{ - if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; -} - -void NullMessageStore::committed(const string * const) +std::auto_ptr<TransactionContext> NullMessageStore::begin() { - if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; + return std::auto_ptr<TransactionContext>(); } -void NullMessageStore::aborted(const string * const) +std::auto_ptr<TPCTransactionContext> NullMessageStore::begin(const std::string&) { - if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; + return std::auto_ptr<TPCTransactionContext>(); } -std::auto_ptr<TransactionContext> NullMessageStore::begin() +void NullMessageStore::prepare(TPCTransactionContext&) { - return std::auto_ptr<TransactionContext>(); } -void NullMessageStore::commit(TransactionContext*) +void NullMessageStore::commit(TransactionContext&) { } -void NullMessageStore::abort(TransactionContext*) +void NullMessageStore::abort(TransactionContext&) { } |