1 Reply Latest reply: Dec 17, 2012 3:24 PM by jtahlborn RSS

    LRU concurrenthashmap


      I have a requirement to implement LRU cache strategy using concurrenthashmap.
      Is there already an implementation in oracle.javatools.* related to this?
      I cannot use open source implementations so anything related to JDk will be really helpful.

        • 1. Re: LRU concurrenthashmap
          nope, there is nothing like this in the jdk currently (assuming you specifically mean the ConcurrentMap). there is a non-synchronized LRU map in LinkedHashMap. you could use it to create a synchronized Map which exposes ConcurrentMap methods. however, it won't have the concurrent performance characteristics of something like ConcurrentHashMap.