Home » Java » Core Java » Java Concurrency Essentials Tutorial

About Martin Mois

Martin is a Java EE enthusiast and works for an international operating company. He is interested in clean code and the software craftsmanship approach. He also strongly believes in automated testing and continuous integration.

Java Concurrency Essentials Tutorial

Course Overview

Concurrency is always a challenge for developers and writing concurrent programs can be extremely hard. There is a number of things that could potentially blow up and the complexity of systems rises considerably when concurrency is introduced.

However, the ability to write robust concurrent programs is a great tool in a developer’s belt and can help build sophisticated, enterprise level applications.

In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety.

As you advance, the following lessons will deal with the tools you can leverage, such as the Fork/Join framework, the java.util.concurrent JDK package. To sum those up, you will learn about testing concurrent applications.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

6. Spring Interview Questions

7. Android UI Design

and many more ....

 

About the Author

Martin is a software engineer with more than 10 years of experience in software development.His current interests include Java EE, web applications with focus on HTML5 and performance optimizations. Currently Martin works for an international operating company in the Java EE domain and is concerned in his day-to-day work with larg-scale big data systems.

Lessons

Introduction to Threads and Concurrency

In the first lesson of our course, you will get introduced to the magical world of Concurrency. You will lean about Threads and how to create them, start them, put them to sleep and more. Additionally, you will get a first look at Synchronization as well as Atomic Access to variables. Sample code is provided for each of the examples.

Concurrency Fundamentals: Deadlocks and Object Monitors

In this lesson, you will learn about important aspects of concurrent applications, such as liveness and multi-threading. You will learn how to avoid common pitfalls of parallel programming, such as deadlocks, thread starvation etc. Additionally, you will get a look into code synchronization and how that can be achieved. Finally, design strategies for writing multi-threaded code will be examined.

The java.util.concurrent Package

In this lesson, we will focus on the java.util.concurrent Package, which includes many interesting classes that provide necessary and helpful functionality needed to implement multi-threaded applications. We will see how to use the relevant API classes, like the executors, the concurrent collections, the atomic variables and more.

Performance, Scalability and Liveness

In this lesson, we discuss the topic of performance for multi-threaded applications. After defining the terms performance and scalability, we take a closer look at Amdahl’s Law. Further in the lesson we see how we can reduce lock contention by applying different techniques, which are demonstrated with code examples.

Fork/Join Framework

In this lesson, we discuss the Fork/Join Framework which is part of the JDK since version 1.7. This framework provides a very handy set of classes that can be used to write concurrent applications based on the relevant algorithm. We will explore the main classes and provide examples on how to use them.

Testing Concurrent Applications

In this final lesson, we will discuss the testing of multi-threaded applications. We implement a simple blocking queue and test its blocking behavior as well as its behavior and performance under stress test conditions. Finally we shed some light on available frameworks for unit testing of multi-threaded classes (e.g. JMock, Grobo Utils, etc).

Make sure to retweet this, let your social followers know!

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

6. Spring Interview Questions

7. Android UI Design

 

and many more ....

 

 

4 comments

  1. Thank you Martin Mois for sharing this detailed tutorial.
    It’s really helpful. Keep up the good work.

  2. Awesome tutorial, I really got the detailed explanation on multi-threading and concurrency concepts.

    Thank you so much :)

  3. Kayaman, Hayri Emrah

    Precisely written, well knowledged, tutorial, must read for anyone !

    Beside : Thank you so much for the given support and friendship in the past during my time on NOMT and MOLS projects

    Sincerly, greets

    Hayri Emrah Kayaman

  4. Your are a super star , thank you :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns