Java 9 Concurrency - Basic Elements
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
13 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Java 9 Concurrency - Basic Elements to your Wishlist.

Add to Wishlist

Java 9 Concurrency - Basic Elements

Learn Java Concurrency API with Thread Synchronization and utilities
0.0 (0 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
13 students enrolled
Created by Packt Publishing
Last updated 8/2017
Price: $125
30-Day Money-Back Guarantee
  • 2.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Find out to manage the basic components of the Java Concurrency API
  • Use synchronization mechanisms to avoid data race conditions and other problems of concurrent applications
  • Use of high-level mechanisms to synchronize multiple threads
  • Use the synchronized keyword to implement an application
View Curriculum
  • Viewers should already be comfortable with general Java development practices, and a basic grasp of threads would be an advantage.

Writing concurrent and parallel programming applications is an integral skill for any Java programmer. Java 9 comes with a host of fantastic features, including significant performance improvements and new APIs.This video will take you through all the new APIs, showing you how to build parallel and multi-threaded applications. The video covers all the elements of the Java Concurrency API, with essential recipes that will help you take advantage of the exciting new capabilities.You will learn how to use parallel and reactive streams to process massive data sets. Next, you will move on to create streams and use all their intermediate and terminal operations to process big collections of data in a parallel and functional way.Further, you’ll discover a whole range of recipes for almost everything, such as thread management, synchronization, executors, parallel and reactive streams, and many more. At the end of the video, you will learn how to obtain information about the status of some of the most useful components of the Java Concurrency API and how to test concurrent applications using different tools.

About the author

Javier Fernández González is a software architect with almost 15 years experience in Java technologies. He has worked as a teacher, researcher, programmer, analyst, and writer, and he now works as an architect in all types of projects related to Java, especially J2EE. As a teacher has over 1,000 hours of training in basic Java, J2EE, and the Struts framework. As a researcher, he has worked in the field of information retrieval, developing applications for processing large amounts of data in Java, and has participated as a co-author in several journal articles and conference presentations. Recently, he worked on developing J2EE web applications for various clients from different sectors (public administration, insurance, healthcare, transportation, and so on). He has also worked as a software architect. He is the author of the books, Java 7 Concurrency Cookbook and Mastering Concurrency Programming with Java 8 by Packt.

Who is the target audience?
  • This course is for Java developer interested in enhancing your knowledge of concurrent programming and multithreading further, as well as discovering the new concurrency features of Java 8 and Java 9.
Compare to Other Concurrency Courses
Curriculum For This Course
24 Lectures
Thread Management
11 Lectures 51:57

This video provides an overview of the entire course.

Preview 03:09

Build a class that implements the Runnable interface and the run method to create an object of the Thread class.

Creating, Running, and Setting the Characteristics of a Thread

Java provides an interruption mechanism that indicates to a thread that you want to finish it.

Interrupting a Thread

The thread implements a complex algorithm divided into some methods, or it has methods with recursive calls. Java provides the InterruptedException exception.

Controlling the Interruption of a Thread

The thread doesn't use any resources of the computer.Use the sleep method of the Thread class.

Sleeping and Resuming a Thread

In some situations, we will have to wait for the end of the execution of a thread (the run() method ends its execution). We can use the join() method of the Thread class.

Waiting for the Finalization of a Thread

Java has a special kind of thread called daemon thread. Daemon threads are normally used as service providers for normal threads running in the same program.

Creating and Running a Daemon Thread

The Java programming language, as almost all modern programming languages, implements an exception-based mechanism to manage error situations.

Processing Uncontrolled Exceptions in a Thread

One of the most critical aspects of a concurrent application is shared data. This has a special importance in objects that extend the Thread class or implement the Runnable interface. The Java Concurrency API provides a clean mechanism called thread-local variables.

Using Thread Local Variables

An interesting functionality offered by the concurrency API of Java is the ability to group threads.Java provides the ThreadGroup class to work with a group of threads.

Grouping Threads and Processing Uncontrolled Exceptions in a Group of Threads

The factory pattern is one of the most used design patterns, and its objective is to develop an object whose mission is to create other objects of one or several classes. Java provides the ThreadFactory interface to implement a thread object factory.

Creating Threads Through a Factory
Basic Thread Synchronization
6 Lectures 41:53

The most basic methods of synchronization in Java is the use of the synchronized keyword to control concurrent access to a method or a block of code

Preview 08:56

A classic problem in concurrent programming is the producer-consumer problem. We will implement the producer-consumer problem using thesynchronized keyword and the wait(), notify(), and notifyAll() methods.

Using Conditions in Synchronized Code

Java provides another mechanism for synchronizing blocks of code. It's based on the Lock interface and classes.

Synchronizing a Block of Code with a Lock

One of the most significant improvements offered by locks is the ReadWriteLock interface and the ReentrantReadWriteLock class; the unique class that implements that interface.

Synchronizing Data Access with Read/Write Locks

A classic problem in concurrent programming is the producer-consumer problem. We will implement the producer-consumer problem using locks and conditions.

Using Multiple Conditions in a Lock

The StampedLock class provides a special kind of lock that is different from the ones provided by the Lock or ReadWriteLock interfaces.

Advanced Locking with the StampedLock Class
Thread Synchronization Utilities
7 Lectures 51:40

The Java language provides the semaphore mechanism. A semaphore is a counter that protects access to one or more shared resources.

Preview 06:17

The Java concurrency API provides a class that allows one or more threads to wait until aset of operations are done. It's called the CountDownLatch class.

Waiting for Multiple Concurrent Events

The Java concurrency API provides a synchronizing utility that allows the synchronization of two or more threads at a determined point. It's the CyclicBarrier class.

Synchronizing Tasks in a Common Point

One of the most complex and powerful functionalities offered by the Java concurrency API is the ability to execute concurrent-phased tasks using the Phaser class. This mechanism is useful when we have some concurrent tasks divided into steps.

Running Concurrent-Phased Tasks

The Phaser class provides a method that is executed every time the phaser changes the phase,using the onAdvance() method.

Controlling Phase Change in Concurrent-Phased Tasks

The Java concurrency API provides a synchronization utility that allows the exchange of data between two concurrent tasks.The Exchanger class allows you to have adefinition of a synchronization point between two threads.

Exchanging Data Between Concurrent Tasks

The Java 8 Concurrency API includes a new synchronization mechanism with the CompletableFuture class. This class implements the Future object and the CompletionStage interface.

Completing and Linking Tasks Asynchronously
About the Instructor
Packt Publishing
3.9 Average rating
8,249 Reviews
59,086 Students
687 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.