Thursday, June 3, 2010

ConcurrentHashMap

It allows concurrent modification of the Map from several threads without the need to block them.

Retrieval operations (including get) generally do not block, so may overlap with update operations (including put and remove). Retrievals reflect the results of the most recently completed update operations.

However, even though all operations are thread-safe, retrieval operations do not entail locking. ConcurrentHashMap is optimized for concurrent access.

No comments:

Post a Comment