Streams, Collectors, and Optionals for Data Processing in Java 8
MP4 | AVC 318kbps | English | 1024x768 | 15fps | 4h 29mins | AAC stereo 86kbps | 582 MB
Genre: Video Training
The Stream API and the Collectors are two new additions to the JDK in Java 8 that allow the efficient processing of data using the map / filter / reduce approach. It brings many new patterns on the table, and ways to extend them. We show how to connect streams to non-standard sources of data, how to build streams on other streams. The notion of Optional, introduced to handle the reduction of empty streams is also shown on advanced data processing patterns. And at last, collectors are shown, basic patterns first then advanced ones, where we build our own custom collector.
Connecting Streams to Custom Sources: The Spliterator Pattern
Introduction to the Course
What Are You Going to Learn in This Course?
What Should You Know to Follow This Course? Agenda of This Module
What Is a Spliterator?
The Spliterator Interface, What Do We Need to Implement?
The ArrayListSpliterator: the tryAdvance() Method
The ArrayListSpliterator: the trySplit() Method
Introduction to the Live Coding: How to Write a Spliterator
Using Our Own Spliterator: Setting up the Application
Using Our Own Spliterator: Writing the Use Case Pattern
Implementing Our Own Spliterator: The First Methods
Implementing Our Own Spliterator: The tryAdvance() Method
Implementing the tryAdvance() Method: Setting the Returned Object
Implementing Our Own Spliterator: Running the Example
Live Coding Session Wrap-up
Module Wrap-up
Advanced Java 8 Stream Patterns: FlatMap, Streams of Numbers
Introduction and Agenda of the module
Concatenating Streams: The Stream.concat Pattern
Merging Streams: The Stream.of and flatMap Pattern
How Does the flatMap Pattern Work: Examples
Splitting a Text into Words Using the flatMap Pattern
Splitting a Text into Words: Putting the Result in a Set
State of a Stream: The Stream.characteristics() Method
What Are the Eight Characteristics of a Stream?
How Does the Steam Methods Modify the State of a Stream
State of a Stream: A First Example
How to Use the Stream.sorted() Method with a Comparator
Live Coding Session: Presentation of the Example
Live Coding: Merging Streams Using Stream.of and flatMap
Live Coding: Splitting a Large Text in Words Using flatMap
Live Coding Session Summary
Streams of Numbers: Converting from a Stream of Objects
Optimizing the Conversion from a Stream of Objects
Patterns to Build Streams of Numbers
Specialized Methods: min(), max() and summaryStatistics()
Live Coding Session: Introduction of the Scrabble Example
Live Coding: Computing the Score of a Word in Scrabble
Live Coding: Getting the Word with the Best Score
Live Coding: Computing Statistics on the Words of Shakespeare
Live Coding Session and Module Wrap-up
Parallel Data Processing Pipelines Using Java 8 Streams
Introduction and Agenda of the Module
Building Parallel Processing on Multithread
Tools for Parallel Processing in the JDK
Parallel Streams: First Patterns
Caveats in Parallel Processing: Synchronization and Visibility
Stateful and Stateless Operations: The Limit Method Example
How to Tell a Stateless Operation from a Stateful One
Parallel Performance Analysis: Description of the Use Case
Parallel Performance Analysis: Understanding the Computing Times
A Sneaky Stateful Operation: The unordered() Method
Parallel Reduction: What Not to Do!
Tuning Parallelism: Setting the Size of the Common Fork Join Pool
Tuning Parallelism: Setting the Executor of a Computation
Live Coding: Understanding the Multithreaded Computation
Live Coding: Parallel Reduction, How Can It Go Wrong?
Live Coding: Parallel Reduction, Hint at the Collector Pattern
Live Coding Session Summary
Module Wrap-up
Building Errorless Processing Pipelines with Optionals
Introduction and Agenda of the Module
Optional: A First Explanation of the Concept
Patterns to Use an Optional as a Wrapper Type That Can Be Empty
Patterns to Build an Optional from Scratch
More Optional Patterns: The Map, Filter and ifPresent Patterns
How We Can See an Optional as a Special Kind of Stream
Introduction to Advanced Optional Patterns: The NewMath Example
Building a First Data Processing Pipeline with the NewMath Class
How Does the Optional.flatMap Pattern Work?
Leveraging the flatMap Pattern to Convert an Optional to a Stream
Building a Parallel Data Processing Pipeline with NewMath
Introduction to the Live Coding Session
Live Coding: How Not to Process Doubles with NewMath
Live Coding: Failing to Go Parallel with the Wrong Pattern
Live Coding: Building an Optional flatMapper for NewMath
Live Coding: Analyzing the Optional flatMapper
Live Coding: Parallel Stream with the Optional flatMapper
Live Coding Session Summary
Module Wrap-up
Collecting Data in Complex Containers Using Collectors
Introduction and Agenda of the Module
What Is a Collector? A Look Back at the Reduction Step
A First Anti-pattern to Reduce a Stream in a List
Reduction in a List: The Right Pattern with a Collector
The Collectors Class: We Have a Collector for That
Computing a Max and an Average with a Collector
Building Strings with a Collector
Collecting Data in a Set
Collecting in a Map: The partiionningBy and groupingBy Patterns
Adding a Downstream Collector to Process Map Values
Specifying Built Containers, the collectingAndThen Pattern
Live Coding: Introducing the Shakespeare Plays Scrabble Use Case
Live Coding: Building Histograms to Extract the Best Words
Live Coding: Writing Whizzing with a Blank Letter
Live Coding: Computing the Histogram of the Letters of a Word
Live Coding: Computing the Number of Blanks Need for Whizzing
Live Coding: Computing the Score of Words with Blank Letters
Live Coding: Computing the Best Words with Blanks
Live Coding Session Summary
Module Wrap-up
Building Custom Collectors for Advanced Data Processing
Introduction and Agenda of the Module
What if We Need Collectors that Are Not in the Collectors Class?
Collectors Made of a Supplier, an Accumulator, and a Combiner
Example of a Supplier and Accumulator for an ArrayList
Example of a Combiner for an ArrayList
Putting it All Together: The Collector.of Pattern
Live Coding: Presenting the Actors and Movies Use Case
Live Coding: Counting the Number of Actors
Live Coding: Finding the Actor That Played in the Most Movies
Live Coding: Adding the Year Constraint, Introduction
Live Coding: Setting the Custom Downstream Collector
Live Coding: Writing the Supplier for the Custom Collector
Live Coding: Writing the Accumulator
Live Coding: Writing the Combiner by Merging Maps
Live Coding: Taking a Global Look at the Custom Collector
Live Coding: Extracting the Max of the Submap
Live Coding: Extracting the Max of the Main Map
Live Coding Session Summary
Other Custom Collectors: The summaryStatistics Pattern
Module Wrap-up
发布日期: 2017-02-22