diff options
| author | Gordon Sim <gsim@apache.org> | 2006-11-30 14:48:24 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2006-11-30 14:48:24 +0000 |
| commit | 505b253590d2cf8ebfe35ccd2ff3df2443240001 (patch) | |
| tree | 08896f180af647019b83d8157f578a276a9e9136 /cpp/src/qpid/broker/MessageStore.h | |
| parent | 4d7f04636758d39a3ef7250cbcc745edb3de7685 (diff) | |
| download | qpid-python-505b253590d2cf8ebfe35ccd2ff3df2443240001.tar.gz | |
Some further tweaks to MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480946 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/MessageStore.h')
| -rw-r--r-- | cpp/src/qpid/broker/MessageStore.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/MessageStore.h b/cpp/src/qpid/broker/MessageStore.h index 1c5a16c50d..3de7a70a70 100644 --- a/cpp/src/qpid/broker/MessageStore.h +++ b/cpp/src/qpid/broker/MessageStore.h @@ -27,6 +27,16 @@ namespace qpid { namespace broker { + struct MessageStoreSettings + { + /** + * Messages whose content length is larger than this value + * will be staged (i.e. will have thier data written to + * disk as it arrives) and will load their data lazily. On + * recovery therefore, only the headers should be loaded. + */ + u_int64_t stagingThreshold; + }; /** * An abstraction of the persistent storage for messages. */ @@ -44,7 +54,7 @@ namespace qpid { /** * Request recovery of queue and message state from store */ - virtual void recover(RecoveryManager& queues) = 0; + virtual void recover(RecoveryManager& queues, const MessageStoreSettings* const settings = 0) = 0; /** * Stores a messages before it has been enqueued @@ -68,17 +78,17 @@ namespace qpid { /** * Appends content to a previously staged message */ - virtual void appendContent(u_int64_t msgId, const std::string& data) = 0; + virtual void appendContent(Message* const msg, const std::string& data) = 0; /** * Loads (a section) of content data for the specified - * message id (previously set on the message through a - * call to stage or enqueue) into data. The offset refers - * to the content only (i.e. an offset of 0 implies that - * the start of the content should be loaded, not the - * headers or related meta-data). + * message (previously stored through a call to stage or + * enqueue) into data. The offset refers to the content + * only (i.e. an offset of 0 implies that the start of the + * content should be loaded, not the headers or related + * meta-data). */ - virtual void loadContent(u_int64_t msgId, std::string& data, u_int64_t offset, u_int32_t length) = 0; + virtual void loadContent(Message* const msg, std::string& data, u_int64_t offset, u_int32_t length) = 0; /** * Enqueues a message, storing the message if it has not |
