Java concurrent data structures

Java has a number of mutable data structures that are meant for concurrency and thread-safety, which implies that multiple callers can safely access these data structures at the same time, without blocking each other. When we need only the highly concurrent access without the state management, these data structures may be a very good fit. Several of these employ lock free algorithms. We discussed about the Java atomic state classes in the Atomic updates and state section, so we will not repeat them here. Rather, we will only discuss the concurrent queues and other collections.

All of these data structures live in the java.util.concurrent package. These concurrent data structures are tailored to leverage the JSR ...

Get Clojure: High Performance JVM Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.