Solr
  1. Solr
  2. SOLR-1893

common code in LRUCache and FastLRUCache should be refactored into SolrCacheBase

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      In SOLR-571 I created SolrCacheBase as a place to put some new code that i wanted to use in both LRUCache and FastLRUCache, but looking at those classes there is already quite a bit of cut/paste, and it would be nice to refactor anything that is duplicated up into the new parent class.

      1. SOLR-1893.patch
        15 kB
        Tomás Fernández Löbbe
      2. SOLR-1893.patch
        13 kB
        Hoss Man

        Activity

        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hoss Man made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Tomás Fernández Löbbe [ tomasflobbe ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Hide
        Hoss Man added a comment -

        Committed revision 1331622.

        Show
        Hoss Man added a comment - Committed revision 1331622.
        Hoss Man made changes -
        Attachment SOLR-1893.patch [ 12524940 ]
        Hide
        Hoss Man added a comment -

        Updated tomas's patch to trunk with some tweaks

        Tomas: in general your patch looks good to me, but i did remove the "populateLst" method – even if it had a better name, i think that method just makes the subclasses harder to read, w/ really removing any duplication (yes they add the same keys, but the values come from differnet places)

        Show
        Hoss Man added a comment - Updated tomas's patch to trunk with some tweaks Tomas: in general your patch looks good to me, but i did remove the "populateLst" method – even if it had a better name, i think that method just makes the subclasses harder to read, w/ really removing any duplication (yes they add the same keys, but the values come from differnet places)
        Tomás Fernández Löbbe made changes -
        Field Original Value New Value
        Attachment SOLR-1893.patch [ 12446700 ]
        Hide
        Tomás Fernández Löbbe added a comment -

        On the attached file I propose a possible refactor.

        Show
        Tomás Fernández Löbbe added a comment - On the attached file I propose a possible refactor.
        Hoss Man created issue -

          People

          • Assignee:
            Tomás Fernández Löbbe
            Reporter:
            Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development