Java Concurrency and Multithreading in Practice

Course

Online

£ 200 + VAT

Description

  • Type

    Course

  • Methodology

    Online

  • Start date

    Different dates available

Improve the performance of your application by using modern Java's multithreading features Multi-core processors are everywhere—from super-computers to mobile devices right in your pocket. That's why a modern developer must know how to leverage the power of multithreading.This course will teach you how to use parallelism and concurrency in Java. You will learn how to parallelize tasks and functions with the ForkJoin framework and Streams. You will also learn how to work with the very popular Reactive Streams recently introduced to Java. Furthermore, you will master concurrent collections and lower-level synchronization techniques with locks.This course conveniently provides quizzes to evaluate your knowledge and help you retain the new concepts.By the end of this practical training course, you will have the knowledge to write elegant programs for multicore computers with enhanced performance and improved responsiveness.About the AuthorTatiana Fesenko is a senior Java developer with a proven track record of bringing products from concept to implementation and a background that includes working in four countries with collaborators from almost all continents in corporate, semi-public, and start-up environments. She is highly driven, thorough, and passionate about technology, and has been professionally using Java for more than 15 years.

Facilities

Location

Start date

Online

Start date

Different dates availableEnrolment now open

About this course

Build efficient and elegant code with popular parallel Java frameworks, including ForkJoin and Streams
Master Reactive Streams to process data
Explore the existing thread-safe collections and types, to avoid reinventing the wheel
Understand how threads work in Java and how to manage them
Leverage multithreading to increase your application's performance

Questions & Answers

Add your question

Our advisors and other users will be able to reply to you

Who would you like to address this question to?

Fill in your details to get a reply

We will only publish your name and question

Reviews

This centre's achievements

2021

All courses are up to date

The average rating is higher than 3.7

More than 50 reviews in the last 12 months

This centre has featured on Emagister for 4 years

Subjects

  • Play
  • Java

Course programme

Running Tasks in Parallel 5 lectures 30:51 The Course Overview This video will give you an overview about the course. Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Running Tasks in Parallel - Quiz Running Tasks in Parallel 5 lectures 30:51 The Course Overview This video will give you an overview about the course. Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Running Tasks in Parallel - Quiz The Course Overview This video will give you an overview about the course. The Course Overview This video will give you an overview about the course. The Course Overview This video will give you an overview about the course. The Course Overview This video will give you an overview about the course. This video will give you an overview about the course. This video will give you an overview about the course. Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Executing Tasks in Parallel with ForkJoinPool Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.
  • Create your first parallel task - implement the Callable interface for now
  • Get an instance of a ForkJoinPool, where the tasks will be executed
  • Start the tasks in parallel with invokeAll()
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
Joining the Results of the Tasks Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
Take our first parallel task one step further and combine results of individual subtasks into a single final result.
  • Create a RecursiveTask
  • Spin off subtasks with a fork() method
  • Collect results with the join() method
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
RecursiveAction and RecursiveTask RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.
  • Go beyond RecursiveTask and explore ForkJoinTask
  • Create a RecursiveAction
  • Play with different methods on the ForkJoinPool
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Exception Handling and Cancelling a Task Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.
  • Create a task throwing an unchecked exception, see how it affects other subtasks
  • Handle a checked exception inside the ForkJoinTask.compute() method
  • Cancel a task and see what happens with the execution
Running Tasks in Parallel - Quiz Running Tasks in Parallel - Quiz Running Tasks in Parallel - Quiz Running Tasks in Parallel - Quiz Executing Functions in Parallel with Parallel Streams and Futures. 5 lectures 32:06 Callable and Future Callable and Future are the core abstractions for asynchronous computations. They represent a task and its future result, and create a foundation for almost all other multithreading abstractions.
  • Execute a task in parallel, by creating a callable object and submitting it to an object pool
  • Work with Future and learn about its lifecycle
  • Create a Runnable action, and compare it to its callable counterpart
Thread and Thread Pool Thread is in the root of multithreading. This will be our first encounter with the concept of a thread.
  • Create a thread object and learn about its basic properties
  • Use a better way to create and manage threads – by utilizing thread pools
  • Experiment with different kinds of Thread Pools
CompletableFuture CompletableFuture takes Future to the next level, and allows us to create dependencies between different tasks. For example, to trigger execution of one task/stage on other task/stage’s successful completion.
  • Create a CompletableFuture
  • Chain several CompletableFuture objects with thenAccept(), thenCombine(), and thenApply()
  • Handle exceptions with #handle()
Sequential Streams Many manipulations with collections communicate better when written in functional-style. Java Streams allow us to use functional-style on collections making code more readable, and thus, more maintainable.
  • Create streams from different data sources, such as arrays or collections
  • Run different transformation and reduction operations
  • See how intermediate operations are lazy, and how important it is to use a terminal operation
Parallel Streams Parallelizing streams with big number of elements, or with long-running transformations may improve performance nts, or with long-running transformations may improve performance.
  • Create parallel streams from an existing stream, or directly from a collection
  • Learn when to choose parallel streams over sequential streams
  • Recap section 2 and compare Thread Pool to ForkJoinPool
Parallelizing...

Additional information

Some basic workable knowledge of Java is assumed

Java Concurrency and Multithreading in Practice

£ 200 + VAT