diff options
author | Gordon Sim <gsim@apache.org> | 2008-11-06 16:45:27 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-11-06 16:45:27 +0000 |
commit | f5371ed7a94deb0c261d1ca8b5185d8c94cdf325 (patch) | |
tree | 142d6b52c36c4b50e0079d296f6ce5be5a58f364 /cpp/src/qpid/client/MessageReplayTracker.h | |
parent | 357557ff3f16b3dc0e6dacfab00e2d0a84f5c8fb (diff) | |
download | qpid-python-f5371ed7a94deb0c261d1ca8b5185d8c94cdf325.tar.gz |
* fix bug causing last message to occasionally be lost on replay
* make presence of gaps an error condition in the resuming_receiver example
* add ability to apply functor to replay buffer
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711903 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/MessageReplayTracker.h')
-rw-r--r-- | cpp/src/qpid/client/MessageReplayTracker.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/MessageReplayTracker.h b/cpp/src/qpid/client/MessageReplayTracker.h index 40324de4e9..45b16fb704 100644 --- a/cpp/src/qpid/client/MessageReplayTracker.h +++ b/cpp/src/qpid/client/MessageReplayTracker.h @@ -44,6 +44,13 @@ class MessageReplayTracker void setFlushInterval(uint interval); uint getFlushInterval(); void checkCompletion(); + + template <class F> void foreach(F& f) { + for (std::list<ReplayRecord>::const_iterator i = buffer.begin(); i != buffer.end(); i++) { + f(i->message); + } + } + private: struct ReplayRecord { |