X-Git-Url: https://code.grnet.gr/git/aquarium/blobdiff_plain/53ea3611f79e90f4257f12c63eae31bb54d88d0c..b51dbda9a7c0a9c803cb331dd4eae4c054533de5:/src/main/scala/gr/grnet/aquarium/store/memory/MemStoreProvider.scala diff --git a/src/main/scala/gr/grnet/aquarium/store/memory/MemStoreProvider.scala b/src/main/scala/gr/grnet/aquarium/store/memory/MemStoreProvider.scala index 301db6d..2330c45 100644 --- a/src/main/scala/gr/grnet/aquarium/store/memory/MemStoreProvider.scala +++ b/src/main/scala/gr/grnet/aquarium/store/memory/MemStoreProvider.scala @@ -185,12 +185,14 @@ extends StoreProvider * * Any exception is propagated to the caller. The underlying DB resources are properly disposed in any case. */ - def foreachIMEventInOccurrenceOrder(userID: String)(f: (IMEventMsg) ⇒ Unit) = { + def foreachIMEventInOccurrenceOrder(userID: String)(f: (IMEventMsg) ⇒ Boolean) = { + var _shouldContinue = true for { - msg <- _imEvents + msg <- _imEvents if _shouldContinue } { - f(msg) + _shouldContinue = f(msg) } + _shouldContinue } //- IMEventStore