Home  Collections intro  Lists  Maps  Sets  Which collection class?  Sorting  Hashing  Advanced
 Video lecture: hash tables  Bloom filters

Note: this article is a "stub" and is due to be expanded soon!

ConcurerntSkipListMap

Java 6 adds a further weapon to the collections armoury in the form of the ConcurrentSkipListMap. In terms of its general functionality, this class is a kind of cross between a ConcurrentHashMap and a TreeMap. In other words:

  • like ConcurrentHashMap, it allows modifications without locking the entire map;
  • like TreeMap, it maintains the keys permanently sorted, thus providing an efficient means of retrieving a submap containing mappings of all the keys within a particular range (in terms of the API, this means it implements SortedMap).

However, compared to ConcurrentHashMap, ConcurrentSkipListMap has some different performance characteristics:

  • it provides more scalable concurrency even over ConcurrentHashMap;
  • this concurrency is paid for with non-constant access times.
comments powered by Disqus

Written by Neil Coffey. Copyright © Javamex UK 2012. All rights reserved. If you have any feedback on the Java collections tutorials in this section or about the content of this site in general, please leave a message on the Javamex forum.