summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/Connection.cpp2
-rw-r--r--cpp/src/qpid/broker/Connection.h1
-rw-r--r--cpp/src/qpid/broker/Queue.cpp26
-rw-r--r--cpp/src/qpid/broker/Queue.h7
-rw-r--r--cpp/src/qpid/broker/SemanticState.cpp4
-rw-r--r--cpp/src/qpid/broker/SemanticState.h1
-rw-r--r--cpp/src/qpid/cluster/Connection.h1
-rw-r--r--cpp/src/qpid/cluster/ProxyInputHandler.h1
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.cpp5
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.h1
-rw-r--r--cpp/src/qpid/sys/OutputTask.h7
11 files changed, 0 insertions, 56 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp
index 17de83e033..725ceee084 100644
--- a/cpp/src/qpid/broker/Connection.cpp
+++ b/cpp/src/qpid/broker/Connection.cpp
@@ -260,8 +260,6 @@ void Connection::closed(){ // Physically closed, suspend open sessions.
}
}
-bool Connection::hasOutput() { return outputTasks.hasOutput(); }
-
bool Connection::doOutput() {
try {
{
diff --git a/cpp/src/qpid/broker/Connection.h b/cpp/src/qpid/broker/Connection.h
index 66ede59df5..00778aea00 100644
--- a/cpp/src/qpid/broker/Connection.h
+++ b/cpp/src/qpid/broker/Connection.h
@@ -92,7 +92,6 @@ class Connection : public sys::ConnectionInputHandler,
void received(framing::AMQFrame& frame);
void idleOut();
void idleIn();
- bool hasOutput();
bool doOutput();
void closed();
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index 068ebe3103..b99b849bcc 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -309,32 +309,6 @@ bool Queue::getNextMessage(QueuedMessage& m, Consumer::shared_ptr c)
}
}
-bool Queue::checkForMessages(Consumer::shared_ptr c)
-{
- Mutex::ScopedLock locker(messageLock);
- if (messages.empty()) {
- //no message available, register consumer for notification
- //when this changes
- listeners.addListener(c);
- return false;
- } else {
- QueuedMessage msg = getFront();
- if (store && !msg.payload->isEnqueueComplete()) {
- //though a message is on the queue, it has not yet been
- //enqueued and so is not available for consumption yet,
- //register consumer for notification when this changes
- listeners.addListener(c);
- return false;
- } else {
- //check that consumer has sufficient credit for the
- //message (if it does not, no need to register it for
- //notification as the consumer itself will handle the
- //credit allocation required to change this condition).
- return c->accept(msg.payload);
- }
- }
-}
-
Queue::ConsumeCode Queue::consumeNextMessage(QueuedMessage& m, Consumer::shared_ptr c)
{
while (true) {
diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h
index 5b177f1cf2..0984d5e2cd 100644
--- a/cpp/src/qpid/broker/Queue.h
+++ b/cpp/src/qpid/broker/Queue.h
@@ -167,13 +167,6 @@ namespace qpid {
QPID_BROKER_EXTERN ~Queue();
QPID_BROKER_EXTERN bool dispatch(Consumer::shared_ptr);
- /**
- * Check whether there would be a message available for
- * dispatch to this consumer. If not, the consumer will be
- * notified of events that may have changed this
- * situation.
- */
- bool checkForMessages(Consumer::shared_ptr);
void create(const qpid::framing::FieldTable& settings);
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp
index e24744fe81..d579f15279 100644
--- a/cpp/src/qpid/broker/SemanticState.cpp
+++ b/cpp/src/qpid/broker/SemanticState.cpp
@@ -659,10 +659,6 @@ void SemanticState::reject(DeliveryId first, DeliveryId last)
unacked.erase(range.start, range.end);
}
-bool SemanticState::ConsumerImpl::hasOutput() {
- return queue->checkForMessages(shared_from_this());
-}
-
bool SemanticState::ConsumerImpl::doOutput()
{
return haveCredit() && queue->dispatch(shared_from_this());
diff --git a/cpp/src/qpid/broker/SemanticState.h b/cpp/src/qpid/broker/SemanticState.h
index c39161c8a6..cae852732d 100644
--- a/cpp/src/qpid/broker/SemanticState.h
+++ b/cpp/src/qpid/broker/SemanticState.h
@@ -116,7 +116,6 @@ class SemanticState : private boost::noncopyable {
bool isBlocked() const { return blocked; }
bool setBlocked(bool set) { std::swap(set, blocked); return set; }
- bool hasOutput();
bool doOutput();
std::string getName() const { return name; }
diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h
index 4795d914ed..f918187079 100644
--- a/cpp/src/qpid/cluster/Connection.h
+++ b/cpp/src/qpid/cluster/Connection.h
@@ -95,7 +95,6 @@ class Connection :
void received(framing::AMQFrame&);
void closed();
bool doOutput();
- bool hasOutput() { return connection.hasOutput(); }
void idleOut() { connection.idleOut(); }
void idleIn() { connection.idleIn(); }
diff --git a/cpp/src/qpid/cluster/ProxyInputHandler.h b/cpp/src/qpid/cluster/ProxyInputHandler.h
index 228f8d092d..ad7f2c44bd 100644
--- a/cpp/src/qpid/cluster/ProxyInputHandler.h
+++ b/cpp/src/qpid/cluster/ProxyInputHandler.h
@@ -46,7 +46,6 @@ class ProxyInputHandler : public sys::ConnectionInputHandler
void idleOut() { target->idleOut(); }
void idleIn() { target->idleIn(); }
bool doOutput() { return target->doOutput(); }
- bool hasOutput() { return target->hasOutput(); }
private:
boost::intrusive_ptr<cluster::Connection> target;
diff --git a/cpp/src/qpid/sys/AggregateOutput.cpp b/cpp/src/qpid/sys/AggregateOutput.cpp
index 709d3bc640..4f0a4fa5af 100644
--- a/cpp/src/qpid/sys/AggregateOutput.cpp
+++ b/cpp/src/qpid/sys/AggregateOutput.cpp
@@ -34,11 +34,6 @@ void AggregateOutput::activateOutput() { control.activateOutput(); }
void AggregateOutput::giveReadCredit(int32_t credit) { control.giveReadCredit(credit); }
-bool AggregateOutput::hasOutput() {
- Mutex::ScopedLock l(lock);
- return !tasks.empty();
-}
-
// Clear the busy flag and notify waiting threads in destructor.
struct ScopedBusy {
bool& flag;
diff --git a/cpp/src/qpid/sys/AggregateOutput.h b/cpp/src/qpid/sys/AggregateOutput.h
index 71ad713eb7..6dad998bb0 100644
--- a/cpp/src/qpid/sys/AggregateOutput.h
+++ b/cpp/src/qpid/sys/AggregateOutput.h
@@ -61,7 +61,6 @@ class AggregateOutput : public OutputTask, public OutputControl
// These functions must not be called concurrently with each other.
QPID_COMMON_EXTERN bool doOutput();
- QPID_COMMON_EXTERN bool hasOutput();
QPID_COMMON_EXTERN void removeOutputTask(OutputTask* t);
QPID_COMMON_EXTERN void removeAll();
diff --git a/cpp/src/qpid/sys/OutputTask.h b/cpp/src/qpid/sys/OutputTask.h
index 005ae7dbc4..fb08a63cd0 100644
--- a/cpp/src/qpid/sys/OutputTask.h
+++ b/cpp/src/qpid/sys/OutputTask.h
@@ -32,13 +32,6 @@ namespace sys {
*@return true if output was generated, false if there is no work to do.
*/
virtual bool doOutput() = 0;
-
- /** Check if there may be work to do, but don't do it.
- * @return True if there may be work to do, false if there is none.
- * Can to return a false positive, to allow implementations to do a
- * faster check than doOutput(). Must never return a false negative.
- */
- virtual bool hasOutput() = 0;
};
}