Cover by Javier Fernández González

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Using thread-safe navigable maps

An interesting data structure provided by the Java API that you can use in your concurrent programs is defined by the ConcurrentNavigableMap interface. The classes that implement the ConcurrentNavigableMap interface stores elements within two parts:

  • A key that uniquely identifies an element
  • The rest of the data that defines the element

Each part has to be implemented in different classes.

Java API also provides a class that implements that interface, which is the ConcurrentSkipListMap interface that implements a non-blocking list with the behavior of the ConcurrentNavigableMap interface. Internally, it uses a Skip List to store the data. A Skip List is a data structure based on parallel lists that allows us to get ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required