-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Java 9 Concurrency Cookbook, Second Edition
By :

A hash table is a data structure that allows you to map a key to a value. Internally, it usually uses an array to store the elements and a hash function to calculate the position of the element in the array, using its key. The main advantage of this data structure is that the insert, delete, and search operations are very fast here, so it's very useful in situations when you have to carry out a lot of search operations.
The Java API provides different hash table implementations through the Map
and ConcurrentMap
interfaces. The ConcurrentMap
interface provides thread-safety and atomic guarantees to all the operations, so you can use them in concurrent applications. The ConcurrentHashMap
class implements the ConcurrentMap
interface and adds some more methods to the ones defined in the interface. This class supports the following:
Both the elements (class and interface) were...