-
Oct 26th, 2011, 04:11 PM
#1
Mongo - Query object: why are sort() & fields() synchronized?
In the Query Object, why do the sort() and fields() methods synchronize on this?
On first read, it looks like this class is not thread-safe, since the criteria are stored in a LinkedHashMap, and the addCriteria() method is not synchronized.
So why are we incurring the overhead of synchronization on these 2 methods?
-
Oct 26th, 2011, 04:16 PM
#2
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules