summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2009-09-22 18:15:57 +0000
committerKim van der Riet <kpvdr@apache.org>2009-09-22 18:15:57 +0000
commit3c1145e1d9fe5499f305e076e6ab48413e272d9a (patch)
treeb0d18c533dbbdb44618933e2eda3eb499acfa300 /cpp/src
parentf13c131456c4fb0a027513242f2d8253aad75ca0 (diff)
downloadqpid-python-3c1145e1d9fe5499f305e076e6ab48413e272d9a.tar.gz
Minor update to allow store access to the message isPersistent() method. This is required for correctly setting the transient flag.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/Message.cpp2
-rw-r--r--cpp/src/qpid/broker/Message.h2
-rw-r--r--cpp/src/qpid/broker/PersistableMessage.h4
-rw-r--r--cpp/src/tests/QueueTest.cpp2
4 files changed, 6 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/Message.cpp b/cpp/src/qpid/broker/Message.cpp
index ae69a429c8..4b85f3b898 100644
--- a/cpp/src/qpid/broker/Message.cpp
+++ b/cpp/src/qpid/broker/Message.cpp
@@ -98,7 +98,7 @@ const FieldTable* Message::getApplicationHeaders() const
return getAdapter().getApplicationHeaders(frames);
}
-bool Message::isPersistent()
+bool Message::isPersistent() const
{
return (getAdapter().isPersistent(frames) || forcePersistentPolicy);
}
diff --git a/cpp/src/qpid/broker/Message.h b/cpp/src/qpid/broker/Message.h
index 3845146955..e4f3534020 100644
--- a/cpp/src/qpid/broker/Message.h
+++ b/cpp/src/qpid/broker/Message.h
@@ -74,7 +74,7 @@ public:
bool isImmediate() const;
QPID_BROKER_EXTERN const framing::FieldTable* getApplicationHeaders() const;
framing::FieldTable& getOrInsertHeaders();
- QPID_BROKER_EXTERN bool isPersistent();
+ QPID_BROKER_EXTERN bool isPersistent() const;
bool requiresAccept();
QPID_BROKER_EXTERN void setTimestamp(const boost::intrusive_ptr<ExpiryPolicy>& e);
diff --git a/cpp/src/qpid/broker/PersistableMessage.h b/cpp/src/qpid/broker/PersistableMessage.h
index a968480249..fd450494b3 100644
--- a/cpp/src/qpid/broker/PersistableMessage.h
+++ b/cpp/src/qpid/broker/PersistableMessage.h
@@ -110,7 +110,9 @@ class PersistableMessage : public Persistable
void requestContentRelease();
void blockContentRelease();
bool checkContentReleasable();
-
+
+ virtual QPID_BROKER_EXTERN bool isPersistent() const = 0;
+
QPID_BROKER_EXTERN bool isEnqueueComplete();
QPID_BROKER_EXTERN void enqueueComplete();
diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp
index 756f4ac3f6..0acfa1b1ff 100644
--- a/cpp/src/tests/QueueTest.cpp
+++ b/cpp/src/tests/QueueTest.cpp
@@ -817,7 +817,7 @@ QPID_AUTO_TEST_CASE(testFlowToDiskBlocking){
BOOST_CHECK_EQUAL(msg02->isContentReleased(), false);
BOOST_CHECK_EQUAL(1u, tq1->getMessageCount());
- intrusive_ptr<Message> msg03 = mkMsg(testStore, std::string(5, 'X'), true); // transient w/ content
+ intrusive_ptr<Message> msg03 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content
DeliverableMessage dmsg03(msg03);
BOOST_CHECK_THROW(sbtFanout1.route(dmsg03, "", 0), ResourceLimitExceededException);
msg03->tryReleaseContent();