Tagged articles

StampedLock

7 articles · Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 5, 2026 · Backend Development

5 Advanced Java Concurrency Tricks That Can Triple Your Throughput

This article walks through five proven Java 21 concurrency tuning techniques—including non‑blocking CompletableFuture pipelines, StampedLock for read‑heavy workloads, bounded queues with CallerRunsPolicy, atomic computeIfAbsent usage in ConcurrentHashMap, and correct virtual‑thread patterns—showing how each can dramatically improve throughput and stability in high‑load systems.

CompletableFutureConcurrencyJava
0 likes · 9 min read
5 Advanced Java Concurrency Tricks That Can Triple Your Throughput
Senior Xiao Ying
Senior Xiao Ying
Feb 6, 2026 · Fundamentals

StampedLock: The High‑Performance Java 8 Lock That Outpaces ReentrantReadWriteLock

StampedLock, introduced in Java 8, provides three lock modes—including an optimistic read that uses a 64‑bit stamp—to achieve higher throughput than ReentrantReadWriteLock in read‑heavy workloads, and the article explains its internal state, usage patterns, code examples, and important limitations.

Java 8Java concurrencyReentrantReadWriteLock
0 likes · 7 min read
StampedLock: The High‑Performance Java 8 Lock That Outpaces ReentrantReadWriteLock
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 18, 2025 · Backend Development

Master Java Concurrency: Choose ReentrantLock, ReadWriteLock, StampedLock, or Semaphore

This article explores Java’s advanced lock mechanisms—ReentrantLock, ReentrantReadWriteLock, StampedLock, and Semaphore—detailing their core features, practical code examples, and ideal usage scenarios, helping developers decide which synchronization tool best fits their performance and concurrency requirements.

ConcurrencyJavaLocks
0 likes · 9 min read
Master Java Concurrency: Choose ReentrantLock, ReadWriteLock, StampedLock, or Semaphore
Programmer1970
Programmer1970
Jan 6, 2025 · Backend Development

Understanding StampedLock in Java 8: Principles and Practical Use

This article explains Java 8's StampedLock—its optimistic and pessimistic read/write modes, internal state handling, source‑code walkthrough, typical usage scenarios, and a performance comparison with ReentrantLock and ReentrantReadWriteLock—providing concrete code examples and detailed analysis for developers.

ConcurrencyJUCJava
0 likes · 12 min read
Understanding StampedLock in Java 8: Principles and Practical Use
Programmer DD
Programmer DD
Jul 29, 2020 · Backend Development

Unlocking StampedLock: How Java’s New Lock Boosts Concurrency

This article explains the design, features, usage patterns, and internal implementation of Java's StampedLock, comparing it with ReentrantReadWriteLock, showing code examples, optimistic reading techniques, and the lock's queue mechanics for improved multi‑threaded performance.

LockOptimisticReadStampedLock
0 likes · 26 min read
Unlocking StampedLock: How Java’s New Lock Boosts Concurrency