Chris Hostetter wrote:
: I briefly considered it when I threw the caching stuff together... but
: the key here is that it's an LRUCache using LinkedHashMap, and there
: is no ConcurrentLinkedHashMap.

But we could have an alternate ConcurrentHashMap based SolrCache that isn't LRU for people who plan on sizing their Caches big enough that they don't care aboutthe replacement strategy (random replacement could be "good enough")

Random thought: could we do better using a combination of a ConcurrentLinkedQueue for keys and a WeakHashRef for the key=>value pairs? would that even work? (i'm not sure what the semantics of a Queue are when the item is already in the queue ... i'm probably smoking crack)

If you can stand O(logN) you could use a priority queue/skip list that has a concurrent implementation (albeit I couldn't find a ASL friendly java implementation of them, so it means someone has to do some work)

it's a bit late for a SoC project as well ;(


-Hoss



Reply via email to