Tag: collections


CopyOnWriteArrayList and CopyOnWriteArraySet

CopyOnWriteArrayList CopyOnWriteArrayList uses an interesting technique to make it thread-safe without a need for synchronization - all mutative operations (add, set, and so on) are implemented by making a fresh copy of the underlying array. This is or...

ConcurrentHashMap

A ConcurrentHashMap is a thread safe implementation of a hash table data structure. A ConcurrentHashMap has the same functional specifications as HashTable with the performance benchmarks comparable to a HashMap. Before we look into ConcurrentHashMap's...

Transfer Queue

A transfer queue is a special type of BlockingQueue (it implements BlockingQueue) where producers may optionally wait until consumers have consumed the corresponding element. Like other blocking queues, a TransferQueue may be capacity bounded. If so, ...