2 Replies Latest reply on Jan 4, 2005 8:52 AM by kkalmbach

    prune in LRUAlgorithm

    kkalmbach

      Currently the prune method in the LRUAlgoritm is private. I want to be able to implement my own prune (probably by calling super.prune(), then add my own additional pruning).
      Is there any downside to making prune protected instead of private assuming I call super.prune().

      The only other option I can see is to basically copy LRUAlgorithm (and LRUPolicy) and rename them and add my additional code to the bottom of prune.

      Thanks
      -Kevin

        • 1. Re: prune in LRUAlgorithm

          OK, I can do that in release 1.2.1 (due next week). I am also planning to externalize the eiviction queue size as well.

          -Ben

          • 2. Re: prune in LRUAlgorithm
            kkalmbach

            After thinking some more. I can also just override process (already public). Have my process call super.process(), then do my own pruning. This seems more OO, because it does not have to override an internal method such as prune. It achieves the same result, so now I don't seem a reason to override prune.