summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-01-14 18:55:46 +0000
committerAlan Conway <aconway@apache.org>2010-01-14 18:55:46 +0000
commit8455ba0b116208f47ce238b384d4af274fa0edb6 (patch)
tree93afbe62eb9e823b04744ff9979f095f16eb3c4a /cpp/src/qpid/broker
parentf0afda45f86254a027317f4ef540138ddeaf7b87 (diff)
downloadqpid-python-8455ba0b116208f47ce238b384d4af274fa0edb6.tar.gz
Removed dead code: OutputTask::hasOutput and Queue::checkForMessages.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
-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
6 files changed, 0 insertions, 41 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; }