Month: September 2023

Copy-on-Write Collections – Concurrency: Part II

Copy-on-Write Collections The copy-on-write collections comprise special-purpose concurrent lists and sets that are recommended when read operations vastly outnumber mutative operations on the collection. The classes CopyOnWriteArrayList and CopyOnWriteArraySet implement the List and the Set interfaces in the java.util package (Figure 23.7). A summary of the copy-on-write classes in the java.util.concurrent package is given in