Details

    • Type: Sub-task Sub-task
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.3.3rc1
    • Component/s: JDO
    • Labels:
      None
    • Number of attachments :
      3
    1. patch-C3156-20110724.txt
      3 kB
      Wensheng Dou
    2. patch-C3156-20110724-2.txt
      11 kB
      Wensheng Dou
    3. patch-C3156-20110726.txt
      11 kB
      Wensheng Dou

      Activity

      Hide
      Wensheng Dou added a comment -

      In CountLimited, the synchronized protects four fields, _mapKeyPos, _keys, _values, _status. So the synchronized should be necessary. We can't replace the Map with ConcurrentHashMap. In this patch, I make some small improvement to the code.

      Show
      Wensheng Dou added a comment - In CountLimited, the synchronized protects four fields, _mapKeyPos, _keys, _values, _status. So the synchronized should be necessary. We can't replace the Map with ConcurrentHashMap. In this patch, I make some small improvement to the code.
      Hide
      Wensheng Dou added a comment -

      In patch-C3156-20110724-2.txt, I use ReentrantReadWriteLock to improve the cache.

      Show
      Wensheng Dou added a comment - In patch-C3156-20110724-2.txt, I use ReentrantReadWriteLock to improve the cache.
      Hide
      Ralf Joachim added a comment -

      At review of CountLimited I asked myself if it wouldn't be neccessary to get a write lock at get() as it modifies status?

      Show
      Ralf Joachim added a comment - At review of CountLimited I asked myself if it wouldn't be neccessary to get a write lock at get() as it modifies status?
      Hide
      Wensheng Dou added a comment -

      Yes, you are right. I have missed the get(). Sorry for that. I just submitted a new patch for that.

      Show
      Wensheng Dou added a comment - Yes, you are right. I have missed the get(). Sorry for that. I just submitted a new patch for that.
      Hide
      Ralf Joachim added a comment -

      Patch committed as is

      Show
      Ralf Joachim added a comment - Patch committed as is

        People

        • Assignee:
          Wensheng Dou
          Reporter:
          Ralf Joachim
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: