summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/NullMessageStore.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-24 18:06:43 +0000
committerAlan Conway <aconway@apache.org>2008-11-24 18:06:43 +0000
commit4a7831032a4620e3c6948299c27f9e76e4b38fa2 (patch)
tree13f5cc58d6bc996248a6e6c980613819d087b417 /cpp/src/qpid/broker/NullMessageStore.cpp
parente126ba6056a1ff4446a12329cd2b3d81720370ed (diff)
downloadqpid-python-4a7831032a4620e3c6948299c27f9e76e4b38fa2.tar.gz
Reduce logging noise from NullMessageStore: log "persistence disabled" once at start up, not on every action.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720243 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/NullMessageStore.cpp')
-rw-r--r--cpp/src/qpid/broker/NullMessageStore.cpp48
1 files changed, 12 insertions, 36 deletions
diff --git a/cpp/src/qpid/broker/NullMessageStore.cpp b/cpp/src/qpid/broker/NullMessageStore.cpp
index edb4cc7d97..689ed15707 100644
--- a/cpp/src/qpid/broker/NullMessageStore.cpp
+++ b/cpp/src/qpid/broker/NullMessageStore.cpp
@@ -44,14 +44,14 @@ public:
}
};
-NullMessageStore::NullMessageStore(bool _warn) : warn(_warn), nextPersistenceId(1) {}
+NullMessageStore::NullMessageStore() : nextPersistenceId(1) {
+ QPID_LOG(info, "No message store configured, persistence is disabled.")
+}
bool NullMessageStore::init(const Options* /*options*/) {return true;}
void NullMessageStore::create(PersistableQueue& queue, const framing::FieldTable& /*args*/)
{
- QPID_LOG(info, "Queue '" << queue.getName()
- << "' will not be durable. Persistence not enabled.");
queue.setPersistenceId(nextPersistenceId++);
}
@@ -61,8 +61,6 @@ void NullMessageStore::destroy(PersistableQueue&)
void NullMessageStore::create(const PersistableExchange& exchange, const framing::FieldTable& /*args*/)
{
- QPID_LOG(info, "Exchange'" << exchange.getName()
- << "' will not be durable. Persistence not enabled.");
exchange.setPersistenceId(nextPersistenceId++);
}
@@ -75,47 +73,28 @@ void NullMessageStore::unbind(const PersistableExchange&, const PersistableQueue
void NullMessageStore::create(const PersistableConfig& config)
{
- QPID_LOG(info, "Persistence not enabled, configuration not stored.");
config.setPersistenceId(nextPersistenceId++);
}
-void NullMessageStore::destroy(const PersistableConfig&)
-{
- QPID_LOG(info, "Persistence not enabled, configuration not stored.");
-}
+void NullMessageStore::destroy(const PersistableConfig&) {}
-void NullMessageStore::recover(RecoveryManager&)
-{
- QPID_LOG(info, "Persistence not enabled, no recovery attempted.");
-}
+void NullMessageStore::recover(RecoveryManager&) {}
-void NullMessageStore::stage(const intrusive_ptr<PersistableMessage>&)
-{
- QPID_LOG(info, "Can't stage message. Persistence not enabled.");
-}
+void NullMessageStore::stage(const intrusive_ptr<PersistableMessage>&) {}
-void NullMessageStore::destroy(PersistableMessage&)
-{
-}
+void NullMessageStore::destroy(PersistableMessage&) {}
-void NullMessageStore::appendContent(const intrusive_ptr<const PersistableMessage>&, const string&)
-{
- QPID_LOG(info, "Can't append content. Persistence not enabled.");
-}
+void NullMessageStore::appendContent(const intrusive_ptr<const PersistableMessage>&, const string&) {}
void NullMessageStore::loadContent(const qpid::broker::PersistableQueue&,
const intrusive_ptr<const PersistableMessage>&,
- string&, uint64_t, uint32_t)
-{
- QPID_LOG(info, "Can't load content. Persistence not enabled.");
-}
+ string&, uint64_t, uint32_t) {}
void NullMessageStore::enqueue(TransactionContext*,
const intrusive_ptr<PersistableMessage>& msg,
- const PersistableQueue& queue)
+ const PersistableQueue&)
{
msg->enqueueComplete();
- QPID_LOG(info, "Message is not durably recorded on '" << queue.getName() << "'. Persistence not enabled.");
}
void NullMessageStore::dequeue(TransactionContext*,
@@ -125,12 +104,9 @@ void NullMessageStore::dequeue(TransactionContext*,
msg->dequeueComplete();
}
-void NullMessageStore::flush(const qpid::broker::PersistableQueue&)
-{
-}
+void NullMessageStore::flush(const qpid::broker::PersistableQueue&) {}
-uint32_t NullMessageStore::outstandingQueueAIO(const PersistableQueue& )
-{
+uint32_t NullMessageStore::outstandingQueueAIO(const PersistableQueue& ) {
return 0;
}