summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/PersistableMessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/PersistableMessage.h')
-rw-r--r--cpp/src/qpid/broker/PersistableMessage.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/cpp/src/qpid/broker/PersistableMessage.h b/cpp/src/qpid/broker/PersistableMessage.h
index 05de9ff4c3..df645493c9 100644
--- a/cpp/src/qpid/broker/PersistableMessage.h
+++ b/cpp/src/qpid/broker/PersistableMessage.h
@@ -10,9 +10,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,6 +31,7 @@
#include "qpid/framing/amqp_types.h"
#include "qpid/sys/Mutex.h"
#include "qpid/broker/PersistableQueue.h"
+#include "qpid/broker/MessageReleaseManager.h"
namespace qpid {
namespace broker {
@@ -46,7 +47,7 @@ class PersistableMessage : public Persistable
sys::Mutex asyncEnqueueLock;
sys::Mutex asyncDequeueLock;
sys::Mutex storeLock;
-
+
/**
* Tracks the number of outstanding asynchronous enqueue
* operations. When the message is enqueued asynchronously the
@@ -68,7 +69,6 @@ class PersistableMessage : public Persistable
void enqueueAsync();
void dequeueAsync();
- bool contentReleased;
syncList synclist;
protected:
@@ -81,6 +81,8 @@ class PersistableMessage : public Persistable
MessageStore* store;
+ MessageReleaseManager releaseMgr;
+
public:
typedef boost::shared_ptr<PersistableMessage> shared_ptr;
@@ -95,9 +97,15 @@ class PersistableMessage : public Persistable
PersistableMessage();
void flush();
-
+
+ bool requestContentRelease();
+
bool isContentReleased() const;
-
+
+ void blockRelease();
+
+ virtual QPID_BROKER_EXTERN bool isPersistent() const = 0;
+
QPID_BROKER_EXTERN bool isEnqueueComplete();
QPID_BROKER_EXTERN void enqueueComplete();
@@ -107,16 +115,16 @@ class PersistableMessage : public Persistable
QPID_BROKER_EXTERN bool isDequeueComplete();
-
+
QPID_BROKER_EXTERN void dequeueComplete();
QPID_BROKER_EXTERN void dequeueAsync(PersistableQueue::shared_ptr queue,
MessageStore* _store);
bool isStoredOnQueue(PersistableQueue::shared_ptr queue);
-
+
void addToSyncList(PersistableQueue::shared_ptr queue, MessageStore* _store);
-
+
};
}}