aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Retrivial operation generally do not block in ConcurrentMaps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Retrivial operation generally do not block in ConcurrentMaps" Watch "Retrivial operation generally do not block in ConcurrentMaps" New topic
Author

Retrivial operation generally do not block in ConcurrentMaps

Nick Widelec
Ranch Hand

Joined: Feb 28, 2013
Posts: 226

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.

OCAJP 7, OCPJP 7
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Nick Widelec
Ranch Hand

Joined: Feb 28, 2013
Posts: 226

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
Bartender

Joined: Oct 14, 2005
Posts: 18672
    
    8

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
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrivial operation generally do not block in ConcurrentMaps