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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.