O'Reilly logo

Mastering Concurrency Programming with Java 8 by Javier Fernández González

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required