Advanced Java 8 Concurrent Patterns
Concurrency is a hard to master topic. This Java course takes you from the basics you already know, (runnable and synchronization) to the next level: the java.util.concurrent API.
What you'll learn
This course, Advanced Java 8 Concurrent Patterns is an in-depth presentation of advanced fundamentals you'll need to understand to write efficient concurrent applications, that support heavy concurrency and provide high throughput. You'll learn about how you can improve the quality of your concurrent code, by using sophisticated concurrent tools that allow for smooth lock acquisition and fault tolerancy. You'll also be introduced to advanced data structures, such as the copy on write arrays, the concurrent blocking queues, the concurrent skip lists and concurrent hashmaps. By the end of this course, you will understand how to use cyclic barriers, count down latches and semaphores, and how to atomic variables to write non-locking code. All of this will help you on your journey to write better applications.
Table of contents
- Version Check 0m
- Introduction, What Are You Going to Learn in This Course? 2m
- What Do You Need to Know to Follow This Course? 2m
- Introducing Executors, What Is Wrong with the Runnable Pattern? 2m
- Defining the Executor Pattern: A New Pattern to Launch Threads 1m
- Defining the Executor Service Pattern, a First Simple Example 2m
- Comparing the Runnable and the Executor Service Patterns 2m
- Understanding the Waiting Queue of the Executor Service 2m
- Wrapping-up the Executor Service Pattern 1m
- From Runnable to Callable: What Is Wrong with Runnables? 2m
- Defining a New Model for Tasks That Return Objects 1m
- Introducing the Callable Interface to Model Tasks 2m
- Introducing the Future Object to Transmit Objects Between Threads 2m
- Wrapping-up Callables and Futures, Handling Exceptions 2m
- Live Coding: Introduction, Runnable in Action 2m
- Live Coding: Executor and Callables, How to Shut Down an Executor 3m
- Live Coding: Using Futures to Handle Time Out 2m
- Live Coding: Handling Exceptions in Callables with Futures 2m
- Live Coding Wrap-up 1m
- Wrapping-up Executors: Single, Fixed, and Cached ExecutorServices 2m
- Wrapping-up Executors: Scheduled ExecutorService 2m
- Shutting Down an ExecutorService: Patterns and Strategies 3m
- Module Wrap-up 2m
- Introduction, Module Agenda 2m
- What Is Wrong with Intrinsic Locking and Synchronization? 2m
- Introducing API Locking with the Lock Interface 2m
- Differences Between Synchronization and API Locking 1m
- Lock Patterns: Interruptible Lock Acquisition 1m
- Lock Patterns: Timed Lock Acquisition 1m
- Lock Patterns: Fair Lock Acquisition 2m
- Wrapping-up the Lock Pattern 1m
- Producer / Consumer Pattern: Wait / Notify Implementation 3m
- Producer / Consumer Pattern: Lock Implementation with Condition 2m
- The Condition Object: Interruptibility and Fairness 2m
- Wrapping-up the Lock and Condition Objects 1m
- Introducing the ReadWriteLock Pattern 2m
- Implementing an Efficient Concurrent Cache with ReadWriteLock 2m
- Wrapping-up the ReadWriteLock Pattern 1m
- Introducing the Semaphore Pattern, First Example 2m
- Semaphore Pattern: Interruptibility and Timed Permit Acquisition 2m
- Wrapping-up the Semaphore Pattern, Control of the Waiting Threads 2m
- Live Coding: Producer / Consumer Based on the Lock Pattern 3m
- Live Coding: Setting up Conditions on the Producer / Consumer 4m
- Live Coding: Setting up the Right Number of Threads 3m
- Live Coding: Dealing with Exceptions with Timeouts 2m
- Live Coding: Setting up Timeout to Unlock a Producer / Consumer 2m
- Live Coding: Creating a Cache with a Race Condition on HashMap 3m
- Live Coding: Fixing the HashMap Cache with ReadWriteLock 3m
- Live Coding Wrap-up 2m
- Module Wrap-up 1m
- Introduction, Module Agenda 1m
- Sharing a Task Among Threads and Merging the Results 2m
- The Problem of Synchronizing on the End of Tasks 1m
- Creating Callable Tasks and Setting up a Barrier 1m
- Understanding the CyclicBarrier Pattern 2m
- Setting up the Full CyclicBarrier Pattern and Launching Tasks 1m
- Waiting for the Barrier with a Time out, Dealing with Exception 2m
- Wrapping-up the CyclicBarrier 1m
- Introducing the Latch, a Barrier That Cannot Be Reset 2m
- Understanding the CountDownLatch Pattern 1m
- A CountDownLatch in Action to Start an Application 2m
- Wrapping-up the CountDownLatch Pattern 1m
- Live Coding: A CyclicBarrier with a Callback Task in Action 3m
- Live Coding: Setting up the ExecutorService, Using TimeOut 4m
- Live Coding: Using Future TimeOut and Task Cancellation 3m
- Live Coding Wrap-up 1m
- Module Wrap-up 1m
- Introduction, Module Agenda 1m
- Understanding Casing: Do We Always Need Synchronization? 2m
- Understanding Casing: An Example of False Concurrency 2m
- Understanding Casing: How Does It Work? 2m
- How to Use the AtomicLong Class and How Does It Work 2m
- The Java Atomic API: The AtomicBoolean Class 1m
- The Java Atomic API: The AtomicInteger and AtomicLong Classes 2m
- The Java Atomic API: The AtomicReference Class 1m
- Wrapping-up the Atomic Objects 2m
- Understanding Adders and Accumulators 2m
- Browsing Through the Adder and Accumulator API 2m
- Live Coding: Fixing a Race Condition on a Simple Counter 3m
- Live Coding: Counting the Number of Retries in an AtomicInteger 4m
- Live Coding Wrap-up 1m
- Module Wrap-up 2m
- Introduction, Module Agenda 1m
- Implementing Concurrency at the API Level 1m
- Hierarchy of Collection and Map, Concurrent Interfaces 1m
- What Does It Mean for an Interface to Be Concurrent? 1m
- Why You Should Avoid Vectors and Stacks 1m
- Understanding Copy On Write Arrays 2m
- Wrapping up CopyOnWriteArrayList 2m
- Introducing Queue and Deque, and Their Implementations 2m
- Understanding How Queue Works in a Concurrent Environment 2m
- Adding Elements to a Queue That Is Full: How Can It Fail? 2m
- Understanding Error Handling in Queue and Deque 2m
- Wrapping up Queue, Deque, and Their Blocking Versions 1m
- Introducing Concurrent Maps and Their Implementations 1m
- Atomic Operations Defined by the ConcurrentMap Interface 2m
- Understanding Concurrency for a HashMap 3m
- Understanding the Structure of the ConcurrentHashMap from Java 7 2m
- Introducing the Java 8 ConcurrentHashMap and Its Parallel Methods 1m
- Parallel Search on a Java 8 ConcurrentHashMap 1m
- Parallel Map / Reduce on a Java 8 ConcurrentHashMap 1m
- Parallel ForEach on a Java 8 ConcurrentHashMap 1m
- Creating a Concurrent Set on a Java 8 ConcurrentHashMap 1m
- Wrapping up the Java 8 ConcurrentHashMap 1m
- Introducing Skip Lists to Implement ConcurrentMap 1m
- Understanding How Linked Lists Can Be Improved by Skip Lists 3m
- Wrapping up the Skip List Structure 1m
- How to Make a Skip List Concurrent Without Synchronization 1m
- Wrapping up ConcurrentSkipList 1m
- Live Coding: Producer / Consumer Built on an ArrayBlockingQueue 3m
- Live Coding: Parallel Reduce in Action on a ConcurrentHashMap 3m
- Live Coding: Parallel Search in Action on a ConcurrentHashMap 2m
- Live Coding: Computing an Average on a ConcurrentHashMap 1m
- Live Coding Wrap-up 1m
- Module Wrap-up 2m
- Course Wrap-up 1m