Concurrent Collections
This lesson gives a brief introduction about Java's concurrent collection classes.
We'll cover the following...
Concurrent Collections
A bit of history before we delve into concurrent collection classes offered by Java. When the Collections Framework was introduced in JDK 1.2, it didn't come with collections that were synchronized. However, to cater for multithreaded scenarios, the framework provided static methods to wrap vanilla collections in thread-safe wrapper objects. These thread-safe wrapper objects came to be known as wrapper collections.
Example Wrapper Collection
ArrayList<Integer> myList = new ArrayList<>();
List<Integer> syncList = Collections.synchronizedList(myList);
For design pattern fans, this is an example of the decorator pattern.
Java 5 introduced ...