CopyOnWriteArrayList
CopyOnWriteArrayList is a thread-safe List implementation in the java.util.concurrent package that uses copy-on-write semantics. It stores its elements in an internal array and replaces that array on each mutating operation. It implements List, RandomAccess, Cloneable, and Serializable.
The concurrency model relies on a volatile reference to the internal array and a private write lock.
Iterators are snapshot-style: they reflect the state of the list at the moment the iterator was created
Performance and use: copy-on-write means reads are fast and do not incur synchronization overhead, but writes
Limitations and alternatives: due to repeated copying, it is not well-suited for large lists or workloads with