diff options
| author | Gordon Sim <gsim@apache.org> | 2006-11-24 17:21:47 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2006-11-24 17:21:47 +0000 |
| commit | d6befaeb77df8a09845e4c11070afe8ab4d5052d (patch) | |
| tree | b5f9ec40dedf2053d04c87f0117f0953a3026180 /cpp/src/qpid/broker/NullMessageStore.cpp | |
| parent | b442c78351bf330cf23b67e86aa17424d5a78966 (diff) | |
| download | qpid-python-d6befaeb77df8a09845e4c11070afe8ab4d5052d.tar.gz | |
Initial sketching out of staging functionality for large messages (i.e. allowing content to be stored as it arrives, rather than collecting it in memory until complete).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@478923 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/NullMessageStore.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/NullMessageStore.cpp | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/cpp/src/qpid/broker/NullMessageStore.cpp b/cpp/src/qpid/broker/NullMessageStore.cpp index 7bc95225b4..ffa444f1a2 100644 --- a/cpp/src/qpid/broker/NullMessageStore.cpp +++ b/cpp/src/qpid/broker/NullMessageStore.cpp @@ -28,31 +28,51 @@ using namespace qpid::broker; -void NullMessageStore::create(const Queue& queue){ - std::cout << "WARNING: Can't create durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; +NullMessageStore::NullMessageStore(bool _warn) : warn(_warn){} + +void NullMessageStore::create(const Queue& queue) +{ + if (warn) std::cout << "WARNING: Can't create durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; +} +void NullMessageStore::destroy(const Queue& queue) +{ + if (warn) std::cout << "WARNING: Can't destroy durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; +} +void NullMessageStore::recover(RecoveryManager&) +{ + if (warn) std::cout << "WARNING: Persistence not enabled, no recovery of queues or messages." << std::endl; } -void NullMessageStore::destroy(const Queue& queue){ - std::cout << "WARNING: Can't destroy durable queue '" << queue.getName() << "'. Persistence not enabled." << std::endl; +void NullMessageStore::stage(Message::shared_ptr&) +{ + if (warn) std::cout << "WARNING: Can't stage message. Persistence not enabled." << std::endl; } -void NullMessageStore::recover(RecoveryManager&){ - std::cout << "WARNING: Persistence not enabled, no recovery of queues or messages." << std::endl; +void NullMessageStore::destroy(Message::shared_ptr&) +{ + if (warn) std::cout << "WARNING: No need to destroy staged message. Persistence not enabled." << std::endl; } -void NullMessageStore::enqueue(TransactionContext*, Message::shared_ptr&, const Queue& queue, const string * const){ - std::cout << "WARNING: Can't enqueue message onto '" << queue.getName() << "'. Persistence not enabled." << std::endl; +void NullMessageStore::enqueue(TransactionContext*, Message::shared_ptr&, const Queue& queue, const string * const) +{ + if (warn) std::cout << "WARNING: Can't enqueue message onto '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::dequeue(TransactionContext*, Message::shared_ptr&, const Queue& queue, const string * const){ - std::cout << "WARNING: Can't dequeue message from '" << queue.getName() << "'. Persistence not enabled." << std::endl; +void NullMessageStore::dequeue(TransactionContext*, Message::shared_ptr&, const Queue& queue, const string * const) +{ + if (warn) std::cout << "WARNING: Can't dequeue message from '" << queue.getName() << "'. Persistence not enabled." << std::endl; } -void NullMessageStore::committed(const string * const){ - std::cout << "WARNING: Persistence not enabled." << std::endl; +void NullMessageStore::committed(const string * const) +{ + if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; } -void NullMessageStore::aborted(const string * const){ - std::cout << "WARNING: Persistence not enabled." << std::endl; +void NullMessageStore::aborted(const string * const) +{ + if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; } -std::auto_ptr<TransactionContext> NullMessageStore::begin(){ +std::auto_ptr<TransactionContext> NullMessageStore::begin() +{ return std::auto_ptr<TransactionContext>(); } -void NullMessageStore::commit(TransactionContext*){ +void NullMessageStore::commit(TransactionContext*) +{ } -void NullMessageStore::abort(TransactionContext*){ +void NullMessageStore::abort(TransactionContext*) +{ } |
