Posts
All the articles I've posted.
Arthas
This article records Arthas startup, reconnection, and common startup issues, with practical examples of finding classes, decompiling, compiling, and hot updates. It also covers changing log levels dynamically, inspecting and modifying JVM options, and cautions when using redefine.
Locks in Java (Part 3): Implementing Wait and Notify with Condition
Explains how to combine Lock and Condition to make threads wait and notify one another, comparing await, signal, and signalAll with wait/notify. A ReentrantLock example illustrates thread coordination and the requirement to acquire the lock before waiting or notifying and release it afterward.
Locks in Java (Part 2): Implementing a Custom Lock
Introduces lock memory semantics and the use of AQS and the Lock interface to implement custom synchronization components, including an example that allows two concurrent threads. It also compares polling with wait/notify and discusses notification, competing for a lock again, and checking conditions.
Locks in Java (Part 1): Lock Categories
Focusing on the object header’s Mark Word, this article explains acquisition, contention, release, and promotion of biased, lightweight, and heavyweight locks. JOL examples inspect lock flags before and after synchronized code, followed by discussion of spinning, blocking, and suitable use cases.