Chapter 8. Processing Massive Datasets with Parallel Streams – The Map and Collect Model

In Chapter 7, Processing Massive Datasets with Parallel Streams – The Map and Reduce Model, we introduced the concept of stream, the new Java 8 feature. A stream is a sequence of elements that can be processed in a parallel or sequential way. In this chapter, you will learn how to work with streams with the following topics:

  • The collect() method
  • The first example – searching data without indexing
  • The second example – a recommendation system
  • The third example – common contacts in a social network

Using streams to collect data

In Chapter 7, Processing Massive Datasets with Parallel Streams – The Map and Reduce Model, we made an introduction to streams. Let's remember ...

Get Mastering Concurrency Programming with Java 8 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.