diff options
Diffstat (limited to 'cpp/src/qpid/client')
| -rw-r--r-- | cpp/src/qpid/client/LocalQueue.cpp | 11 | ||||
| -rw-r--r-- | cpp/src/qpid/client/LocalQueue.h | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp index f44a04837b..951996f005 100644 --- a/cpp/src/qpid/client/LocalQueue.cpp +++ b/cpp/src/qpid/client/LocalQueue.cpp @@ -47,11 +47,18 @@ Message LocalQueue::pop() { void LocalQueue::setAckPolicy(AckPolicy a) { autoAck=a; } -bool LocalQueue::empty() +bool LocalQueue::empty() const { if (!queue) throw ClosedException(); - return queue->isEmpty(); + return queue->empty(); +} + +size_t LocalQueue::size() const +{ + if (!queue) + throw ClosedException(); + return queue->size(); } }} // namespace qpid::client diff --git a/cpp/src/qpid/client/LocalQueue.h b/cpp/src/qpid/client/LocalQueue.h index d7e7e9dbd8..eba28f6599 100644 --- a/cpp/src/qpid/client/LocalQueue.h +++ b/cpp/src/qpid/client/LocalQueue.h @@ -44,8 +44,8 @@ class LocalQueue *@exception ClosedException if subscription has been closed. */ Message pop(); - bool empty(); - + bool empty() const; + size_t size() const; void setAckPolicy(AckPolicy); private: |
