Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrivial operation generally do not block in ConcurrentMaps

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does exactly mean "generally"?

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 holding upon their onset. For aggregate operations such as putAll and clear, concurrent retrievals may reflect insertion or removal of only some entries. Similarly, Iterators and Enumerations return elements reflecting the state of the hash table at some point at or since the creation of the iterator/enumeration. They do not throw ConcurrentModificationException. However, iterators are designed to be used by only one thread at a time.


(emphasis mine)
UPDATE: the quote has been taken from this official javadoc: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html

Thanks in advance.
 
Henry Wong
author
Marshal
Pie
Posts: 21218
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Widelec wrote:What does exactly mean "generally"?

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 holding upon their onset. For aggregate operations such as putAll and clear, concurrent retrievals may reflect insertion or removal of only some entries. Similarly, Iterators and Enumerations return elements reflecting the state of the hash table at some point at or since the creation of the iterator/enumeration. They do not throw ConcurrentModificationException. However, iterators are designed to be used by only one thread at a time.


(emphasis mine)

Thanks in advance.



You probably have to give us a bit more context -- such as where is this paragraph from.

Henry
 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
Nick Widelec wrote:What does exactly mean "generally"?

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 holding upon their onset. For aggregate operations such as putAll and clear, concurrent retrievals may reflect insertion or removal of only some entries. Similarly, Iterators and Enumerations return elements reflecting the state of the hash table at some point at or since the creation of the iterator/enumeration. They do not throw ConcurrentModificationException. However, iterators are designed to be used by only one thread at a time.


(emphasis mine)

Thanks in advance.



You probably have to give us a bit more context -- such as where is this paragraph from.

Henry

You right, edited. Thanks for responding.
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Widelec wrote:What does exactly mean "generally"?


Words don't generally have an exact meaning, you know. But if you substitute the word "usually" for "generally" in that quote, it would have approximately the same meaning.
 
Henry Wong
author
Marshal
Pie
Posts: 21218
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
Nick Widelec wrote:What does exactly mean "generally"?


Words don't generally have an exact meaning, you know. But if you substitute the word "usually" for "generally" in that quote, it would have approximately the same meaning.



I believe the root of this word is to qualify for the "general" case -- meaning what is to be discussed is correct for the common cases, but there are exceptions to this rule. So, yes, "usually" is a good substitution here.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic