How can you create a parallel stream? What is a stateless function, and how does it help achieve correct and efficient parallel execution of stream pipelines?
- [Instructor] Hi, welcome to the sixth…section in this course.…This section is about parallel streams.…The section is divided into three videos.…In the first video, we're going to talk about statefulness,…so stateful and stateless functions,…how to recognize them and avoid the stateful ones.…In the second video, we're going to discuss…how different stream operations behave in parallel streams.…And in the third video, we're going to have a look…under the hood of parallel streams into the so-called…fork/join framework that supports them.…
Hi, welcome to the video on recognizing…and avoiding statefulness.…In this video, we will first learn…how to create a parallel stream.…Then we'll discuss how parallel streams…may give rise to data races;…and in turn, this may require synchronization.…Also, we'll see that one way to avoid both data races…and the need for synchronization is to embrace…the functional paradigm and only use…stateless functions and immutable objects.…
First of all, let's see how to create a parallel streams.…
Note: To get the best results from this course, you should be familiar with basic Java programming concepts, including lists, maps, and sets, and have a suitable IDE, such as Eclipse, NetBeans, or IntelliJ.
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- What is functional programming?
- What are functional interfaces?
- Writing lambda expressions
- Creating functional interfaces
- Composing functions
- Sequential data processing with streams
- Using parallel streams