ReadWriteLock
Noun · Development
Definitions
A Java interface (java.util.concurrent.locks.ReadWriteLock) that provides a pair of associated locks — one for read-only operations and one for writing — returned via readLock() and writeLock(). Its primary implementation, ReentrantReadWriteLock, supports reentrancy, fair/unfair ordering policies, and lock downgrading from write to read.
In plain English: A Java tool that lets many threads read shared data at the same time but ensures only one thread can modify it at a time.
Example: "We use a ReentrantReadWriteLock on the in-memory cache — the read lock lets concurrent lookups proceed, and the write lock blocks during cache refresh."