Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learning Path: Java: Delve Deep into Concurrency with Java 9
Rating: 3.9 out of 5(8 ratings)
147 students
Last updated 3/2018
English

What you'll learn

  • Learn to manage the basic components of the Java Concurrency API
  • Use synchronization mechanisms to avoid data race conditions and other problems of concurrent applications
  • Separate thread management from the rest of the application with the Executor framework
  • Solve problems using a parallelized version of the divide-and-conquer paradigm with the Fork/Join framework
  • Practice efficient techniques to test concurrent applications

Course content

3 sections87 lectures7h 35m total length
  • The Course Overview3:09
    This video provides an overview of the entire course
  • Creating, Running, and Setting the Characteristics of a Thread8:03
    Build a class that implements the Runnable interface and the run method to create an object of the Thread class.
  • Interrupting a Thread4:21
    Java provides an interruption mechanism that indicates to a thread that you want to finish it.
  • Controlling the Interruption of a Thread4:25

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

  • Sleeping and Resuming a Thread3:21

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

  • Waiting for the Finalization of a Thread4:04

    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.

  • Creating and Running a Daemon Thread6:21

    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.

  • Processing Uncontrolled Exceptions in a Thread3:49

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

  • Using Thread Local Variables5:22
    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.
  • Grouping Threads and Processing Uncontrolled Exceptions in a Group of Threads3:44

    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.

  • Creating Threads Through a Factory5:18

    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.

  • Synchronizing a Method8:56
    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
  • Using Conditions in Synchronized Code5:57

    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.

  • Synchronizing a Block of Code with a Lock5:54
    Java provides another mechanism for synchronizing blocks of code. It's based on the Lock interface and classes.
  • Synchronizing Data Access with Read/Write Locks5:44

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

  • Using Multiple Conditions in a Lock8:55

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

  • Advanced Locking with the StampedLock Class6:27

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

  • Controlling Concurrent Access to One or More Copies of a Resource6:17
    The Java language provides the semaphore mechanism. A semaphore is a counter that protects access to one or more shared resources.
  • Waiting for Multiple Concurrent Events4:58

    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.

  • Synchronizing Tasks in a Common Point9:49

    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.

  • Running Concurrent-Phased Tasks9:35

    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.

  • Controlling Phase Change in Concurrent-Phased Tasks7:00
    The Phaser class provides a method that is executed every time the phaser changes the phase,using the onAdvance() method.
  • Exchanging Data Between Concurrent Tasks5:13

    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.

  • Completing and Linking Tasks Asynchronously8:48

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

  • Java 9 Concurrency - Basic Elements

Requirements

  • Java programming knowledge is needed

Description

Writing concurrent and parallel programming applications is a must-have skill for any Java programmer. Java 9 comes with a host of fantastic features, including significant performance improvements and new APIs. So, if you're familiar with the basics of Java and want to understand concurrency and parallel programming techniques, then go for this Learning Path.

Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it. 

The highlights of this Learning Path are:

  • Practical examples on thread safety, high-performance classes, safe sharing, and much more
  • Understand Java 9 APIs and their impact on concurrency

Let's take a look at your learning journey. You will know the elements of the Java concurrency API 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. Moving ahead, you’ll discover a whole range of recipes for almost everything, such as thread management, synchronization, executors, parallel and reactive streams, and much more. By the end of this Learning Path, you will be able to deploy scalable and concurrent application

Meet Your Expert:

We have the best works of the following esteemed author to ensure that your learning journey is smooth:

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 Publishing.

Who this course is for:

  • This Learning Path is targeted at developers who are familiar with Java programming and want to gain the skills of building highly-scalable, robust, and concurrent applications.