Added CountCallback to support 32bit unsigned int passed in defferedget.
This commit is contained in:
parent
1479922901
commit
5ec49d5b8a
|
|
@ -45,7 +45,8 @@ using DeleteCallback = std::function<void(uint32_t deletedmessages)>;
|
||||||
* When retrieving the size of a queue in some way
|
* When retrieving the size of a queue in some way
|
||||||
*/
|
*/
|
||||||
using EmptyCallback = std::function<void()>;
|
using EmptyCallback = std::function<void()>;
|
||||||
using SizeCallback = std::function<void(uint64_t messagecount)>;
|
using CountCallback = std::function<void(uint32_t messagecount)>;
|
||||||
|
using SizeCallback = std::function<void(uint64_t messagesize)>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starting and stopping a consumer
|
* Starting and stopping a consumer
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,9 @@ private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback with the number of messages still in the queue
|
* Callback with the number of messages still in the queue
|
||||||
* @var SizeCallback
|
* @var CountCallback
|
||||||
*/
|
*/
|
||||||
SizeCallback _countCallback;
|
CountCallback _countCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report success for a get operation
|
* Report success for a get operation
|
||||||
|
|
@ -149,7 +149,7 @@ public:
|
||||||
* Register a function to be called when queue size information is known
|
* Register a function to be called when queue size information is known
|
||||||
* @param callback the callback to execute
|
* @param callback the callback to execute
|
||||||
*/
|
*/
|
||||||
DeferredGet &onCount(const SizeCallback &callback)
|
DeferredGet &onCount(const CountCallback &callback)
|
||||||
{
|
{
|
||||||
// store callback
|
// store callback
|
||||||
_countCallback = callback;
|
_countCallback = callback;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue