Guide To CompletableFuture 1. Introduction This article is a guide to the functionality and use cases of the CompletableFuture class – introduced as a Java 8 Concurrency API improvement. Further reading: Runnable vs. Callable in Java Learn the difference between Runnable and Callable interfaces in Java. Read more → Guide… Continue Reading java-completablefuture

A Guide to ConcurrentMap 1. Overview Maps are naturally one of the most widely style of Java collection. And, importantly, HashMap is not a thread-safe implementation, while Hashtable does provide thread-safety by synchronizing operations. Even though Hashtable is thread safe, it is not very efficient. Another fully synchronized Map, Collections.synchronizedMap,… Continue Reading java-concurrent-map

An Introduction to Synchronized Java Collections 1. Overview The collections framework is a key component of Java. It provides an extensive number of interfaces and implementations, which allows us to create and manipulate different types of collections in a straightforward manner. Although using plain unsynchronized collections is simple overall, it… Continue Reading java-synchronized-collections

Thread Safe LIFO Data Structure Implementations 1. Introduction In this tutorial, we’ll discuss various options for Thread-safe LIFO Data structure implementations. In the LIFO data structure, elements are inserted and retrieved according to the Last-In-First-Out principle. This means the last inserted element is retrieved first. In computer science, stack is… Continue Reading java-lifo-thread-safe

Guide to the ConcurrentSkipListMap 1. Overview In this quick article, we’ll be looking at the ConcurrentSkipListMap class from the java.util.concurrent package. This construct allows us to create thread-safe logic in a lock-free way. It’s ideal for problems when we want to make an immutable snapshot of the data while other… Continue Reading java-concurrent-skip-list-map