<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey,<div><br></div><div>In trunk now <a href="http://fisheye.jboss.org/changelog/Infinispan/?cs=1619">http://fisheye.jboss.org/changelog/Infinispan/?cs=1619</a></div><div><br></div><div>Have a look. I disabled DistSyncTxFuncTest and its children since they were failing all the time and preventing me to isolate test suite failure noise. </div><div><br></div><div>Cheers,</div><div>Vladimir<br><div><div>On 2010-03-22, at 2:43 PM, Vladimir Blagojevic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hey,</div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">As a part of new eviction design for 4.1.0 we might require a slight DataContainer API change. Eviction in 4.1.0 will be piggybacked on user threads; current default option using a dedicated eviction thread from EvictionManager is maintained. Option to choose eviction approach will be configurable. </span></font></div><div><br></div><div><span class="Apple-style-span" style="font-size: 13px; ">If we are evicting on a dedicated thread (as we are in the current design) then we would have to rely on iteration of DataContainer entries to evict them (i.e that is the contract between EvictionManagerImpl and DataContainer). In order to support current design I'd have to implement iterator that returns evicted entries along with other non evicted entries. Iterator should put evicted elements prior to non-evicted elements (so EvictionManager would actually pick evicted entries for eviction). Continuing support of this contract feels like a kludge... </span></div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">A better solution seems to be adding a following method to DataContainer: </span></font></div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">Iterator<InternalCacheEntry> getEvictionCandidates()</span></font></div><div><br></div><div>By default, we would return list of entries that were evicted and collected by attached listener to BoundedConcurrentHashMap. If eviction is done on user thread this iterator would be empty, just as it would be empty in case of UnboundedContainer. <span class="Apple-style-span" style="font-size: 13px; ">getEvictionCandidates</span> method would be a new contract between EvictionManager and DataContainer. Method iterator() would therefore return actual non-evicted entries in eviction enabled BoundedContainer and all elements for UnboundedContainer. This approach keeps iterator() contract valid for all containers at the expense of breaking DataContainer API.</div><div><br></div><div>Note that BoundedConcurrentHashMap is a lock amortized eviction enabled version of ConcurrentHashMap. BoundedDataContainer is a new container that will implement LRU and LIRS eviction algorithm. SimpleDataContainer will be renamed to UnboundedDataContainer. FIFO eviction will default to LRU. Other data containers (in current repository) will be deprecated/removed.</div><div><br></div><div>If you have any comments/ objections speak up. </div><div><br></div><div>Regards,</div><div>Vladimir</div></div>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br></div></body></html>