From bfcdddb9af408b62ae4d2689611be8763df45e0c Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Fri, 19 Oct 2007 01:33:24 +0000 Subject: - added init for dir and async options for store - added flush for queue for async processing git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@586207 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/MessageStore.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cpp/src/qpid/broker/MessageStore.h') diff --git a/cpp/src/qpid/broker/MessageStore.h b/cpp/src/qpid/broker/MessageStore.h index 6bd661954f..c8b243ef28 100644 --- a/cpp/src/qpid/broker/MessageStore.h +++ b/cpp/src/qpid/broker/MessageStore.h @@ -37,6 +37,16 @@ namespace broker { */ class MessageStore : public TransactionalStore, public Recoverable { public: + + /** + * init the store, call before any other call. If not called, store + * is free to pick any defaults + * + * @param dir the directory to create logs/db's + * @param async true, enable async, false, enable sync + */ + virtual void init(const std::string& dir, const bool async) = 0; + /** * Record the existence of a durable queue */ @@ -133,6 +143,15 @@ public: */ virtual void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue) = 0; + /** + * Flushes all async messages to disk for the specified queue + * + * Note: that this is async so the return of the function does + * not mean the opperation is complete. + * + * @param queue the name of the queue from which it is to be dequeued + */ + virtual void flush(const qpid::broker::PersistableQueue& queue)=0; /** * Returns the number of outstanding AIO's for a given queue -- cgit v1.2.1