Announcement Announcement Module
Collapse
No announcement yet.
Mongo - Query object: why are sort() & fields() synchronized? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    Created https://jira.springsource.org/browse/DATAMONGO-305 to track this

    Comment

    Working...
    X