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 :
      1

      Description

      In org.castor.cache.hashbelt.*, some code should be cleaned up.
      (1) ReentrantReadWrite.readLock(/WriteLock).lockInterruptibly is not useful, we should ReetrantReadWrite.readLock(/WriteLock) to simplify the code.
      (2) Delete some local variables to simplify the code.
      (3) Inline size() method to reduce get the readlock.

        Activity

        Hide
        Wensheng Dou added a comment - - edited

        What have been done in this patch:
        (1) Use ReetrantReadWrite.readLock(/WriteLock).lock to simplify the code.
        (2) Delete some local variables to simplify the code.
        (3) Inline size() method to reduce extra getting the readlock.
        (4) Delete some extra synchronized, for example, use HashMap to replace Hashtable.

        Show
        Wensheng Dou added a comment - - edited What have been done in this patch: (1) Use ReetrantReadWrite.readLock(/WriteLock).lock to simplify the code. (2) Delete some local variables to simplify the code. (3) Inline size() method to reduce extra getting the readlock. (4) Delete some extra synchronized, for example, use HashMap to replace Hashtable.
        Hide
        Ralf Joachim added a comment -

        Committed almost as is.

        Show
        Ralf Joachim added a comment - Committed almost as is.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: