Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying High Performance with Java
  • Table Of Contents Toc
  • Feedback & Rating feedback
High Performance with Java

High Performance with Java

By : Dr. Edward Lavieri Jr.
close
close
High Performance with Java

High Performance with Java

By: Dr. Edward Lavieri Jr.

Overview of this book

Building high performance into your applications is key to creating an optimal user experience, although it is not the only consideration for the performant nature of your apps. High performance applications can lead to cost-effective resource utilization, especially when scalability and cloud computing are involved. They can also provide highly reliable systems that are easier to maintain. High Performance with Java begins by helping you explore the Java Virtual Machine (JVM) and understand how to push it to its limits to further optimize your programs. You’ll take a hands-on approach to go through memory optimization strategies, input/output operations, concurrency, networking, as well as frameworks and libraries focused on performance. You’ll also learn key strategies and best practices by using industry-relevant examples to architect scalable and resource-efficient applications. The concluding chapters provide valuable insights on optimizing your Java code when interacting with databases and show you how to leverage artificial intelligence (AI) for high performance Java applications. By the end of this book, you’ll grasp the importance of developing high performance Java applications and gain practical experience in implementing key strategies to help ensure your Java applications perform optimally.
Table of Contents (26 chapters)
close
close
Lock Free Chapter
1
Part 1: Code Optimization
7
Part 2: Memory Optimization and I/O Operations
11
Part 3: Concurrency and Networking
15
Part 4: Frameworks, Libraries, and Profiling
19
Part 5: Advanced Topics

Synchronization

Synchronization is another critical Java concept that we should grasp as we seek to fully understand concurrency. As we indicated earlier, we employ synchronization to avoid race conditions.

Race conditions

The condition when multiple threads attempt to modify a shared resource at the same time. The results of this situation are unpredictable and should be avoided.

Let’s look at how we can implement synchronization in our Java applications by looking at several code snippets. First, we demonstrated adding the synchronized keyword to a method’s declaration. This is how we can ensure that only one thread at a time can execute the method on a specific object:

public class Counter {
    private int count = 0;
     public synchronized void increment() {
        count++;
    }
     public synchronized int getCount() {...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
High Performance with Java
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon