Aggregators

Coherence filters are great when you need to retrieve a subset of objects from the cache based on a certain criteria, but there are cases when you want to process these objects as well in order to return a single result.

For example, you might want to retrieve the total amount of all orders for a particular customer. One possible solution is to retrieve all the orders for the customer using a filter and to iterate over them on the client in order to calculate the total. While this will work, you need to consider the implications:

  1. You might end up moving a lot of data across the network in order to calculate a result that is only few bytes long
  2. You will be calculating the result in a single-threaded fashion, which might introduce a performance ...

Get Oracle Coherence 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.