From c5357be8ed980a72613e57af916868f5707be536 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Wed, 5 Aug 2009 14:21:26 +0000 Subject: Rename of MessageStore::discardInit() to MessageStore::truncateInint(), resulting from a cleanup of the code logic in the store. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@801239 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Broker.cpp | 2 +- cpp/src/qpid/broker/MessageStore.h | 2 +- cpp/src/qpid/broker/MessageStoreModule.cpp | 4 ++-- cpp/src/qpid/broker/MessageStoreModule.h | 2 +- cpp/src/qpid/broker/NullMessageStore.cpp | 2 +- cpp/src/qpid/broker/NullMessageStore.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp index a937a6b9b2..8b6cb5e049 100644 --- a/cpp/src/qpid/broker/Broker.cpp +++ b/cpp/src/qpid/broker/Broker.cpp @@ -223,7 +223,7 @@ Broker::Broker(const Broker::Options& conf) : } else { QPID_LOG(notice, "Cluster recovery: recovered journal data discarded and journal files pushed down"); - store->discardInit(true); + store->truncateInit(true); // save old files in subdir } } diff --git a/cpp/src/qpid/broker/MessageStore.h b/cpp/src/qpid/broker/MessageStore.h index 363a474c22..f5c55a50f8 100644 --- a/cpp/src/qpid/broker/MessageStore.h +++ b/cpp/src/qpid/broker/MessageStore.h @@ -63,7 +63,7 @@ class MessageStore : public TransactionalStore, public Recoverable { * @param pushDownStoreFiles If true, will move content of the store dir into a * subdir, leaving the store dir otherwise empty. */ - virtual void discardInit(const bool pushDownStoreFiles = false) = 0; + virtual void truncateInit(const bool pushDownStoreFiles = false) = 0; /** * Record the existence of a durable queue diff --git a/cpp/src/qpid/broker/MessageStoreModule.cpp b/cpp/src/qpid/broker/MessageStoreModule.cpp index bf2a27b539..0b8a5db1c7 100644 --- a/cpp/src/qpid/broker/MessageStoreModule.cpp +++ b/cpp/src/qpid/broker/MessageStoreModule.cpp @@ -41,9 +41,9 @@ MessageStoreModule::~MessageStoreModule() bool MessageStoreModule::init(const Options*) { return true; } -void MessageStoreModule::discardInit(const bool pushDownStoreFiles) +void MessageStoreModule::truncateInit(const bool pushDownStoreFiles) { - TRANSFER_EXCEPTION(store->discardInit(pushDownStoreFiles)); + TRANSFER_EXCEPTION(store->truncateInit(pushDownStoreFiles)); } void MessageStoreModule::create(PersistableQueue& queue, const FieldTable& args) diff --git a/cpp/src/qpid/broker/MessageStoreModule.h b/cpp/src/qpid/broker/MessageStoreModule.h index d6963336fc..02cbd13cf1 100644 --- a/cpp/src/qpid/broker/MessageStoreModule.h +++ b/cpp/src/qpid/broker/MessageStoreModule.h @@ -40,7 +40,7 @@ class MessageStoreModule : public MessageStore MessageStoreModule(MessageStore* store); bool init(const Options* options); - void discardInit(const bool pushDownStoreFiles = false); + void truncateInit(const bool pushDownStoreFiles = false); std::auto_ptr begin(); std::auto_ptr begin(const std::string& xid); void prepare(TPCTransactionContext& txn); diff --git a/cpp/src/qpid/broker/NullMessageStore.cpp b/cpp/src/qpid/broker/NullMessageStore.cpp index 87431453af..6339b655f8 100644 --- a/cpp/src/qpid/broker/NullMessageStore.cpp +++ b/cpp/src/qpid/broker/NullMessageStore.cpp @@ -54,7 +54,7 @@ NullMessageStore::NullMessageStore() : nextPersistenceId(1) { bool NullMessageStore::init(const Options* /*options*/) {return true;} -void NullMessageStore::discardInit(const bool /*pushDownStoreFiles*/) {} +void NullMessageStore::truncateInit(const bool /*pushDownStoreFiles*/) {} void NullMessageStore::create(PersistableQueue& queue, const framing::FieldTable& /*args*/) { diff --git a/cpp/src/qpid/broker/NullMessageStore.h b/cpp/src/qpid/broker/NullMessageStore.h index 48d0e1ea22..e148ec4d51 100644 --- a/cpp/src/qpid/broker/NullMessageStore.h +++ b/cpp/src/qpid/broker/NullMessageStore.h @@ -42,7 +42,7 @@ class NullMessageStore : public MessageStore QPID_BROKER_EXTERN NullMessageStore(); QPID_BROKER_EXTERN virtual bool init(const Options* options); - QPID_BROKER_EXTERN virtual void discardInit(const bool pushDownStoreFiles = false); + QPID_BROKER_EXTERN virtual void truncateInit(const bool pushDownStoreFiles = false); QPID_BROKER_EXTERN virtual std::auto_ptr begin(); QPID_BROKER_EXTERN virtual std::auto_ptr begin(const std::string& xid); QPID_BROKER_EXTERN virtual void prepare(TPCTransactionContext& txn); -- cgit v1.2.1