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 7. Processing Massive Datasets with Parallel Streams – The Map and Reduce Model

Undoubtedly, the most important innovations introduced in Java 8 are lambda expressions and stream API. A stream is a sequence of elements that can be processed in a sequential or parallel way. We can transform the stream applying the intermediate operations and then perform a final computation to get the desired result (a list, an array, a number, and so on). In this chapter, we will cover the following topics:

  • An introduction to streams
  • The first example – a numerical summarization application
  • The second example – an information retrieval search tool

An introduction to streams

A stream is a sequence of data (it is not a data structure) that allows you to apply ...

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