[infinispan-dev] Eviction overhaul

Manik Surtani manik at jboss.org
Tue Mar 31 13:40:35 EDT 2009


On 31 Mar 2009, at 18:03, Galder Zamarreno wrote:

>
>
> Manik Surtani wrote:
>> Hello all.
>> I have finished my work with the eviction code in Infinispan, here is  
>> a summary of what has happened.
>> From a user perspective (including API and configuration) as well  
>> as a design overview, please have a look at
>>    http://www.jboss.org/community/docs/DOC-13449
>
> Comment about the config, seeing as expiration is tighly linked to  
> eviction, wouldn't it make more sense for expiration to be a  
> subelement of eviction? i.e.
>
> <eviction strategy="FIFO" wakeupInterval="1000" maxEntries="2000">
>  <expiration lifespan="1000" maxIdle="500" />
> </eviction>

The presence of an eviction element will cause a less-efficient  
DataContainer to be used.  Wasteful if you don't really care about  
eviction and just want to set expiration defaults.  And they aren't  
tightly linked at all, except that the eviction thread would also  
purge expired data in the container.

> I suppose expiration element attributes are not part of eviction  
> element since they're primarily an optional feature and maxEntries  
> is the main config option?

maxEntries and strategy, yes.

>
>
>> From an implementation perspective, have a look at the srcs of  
>> FIFODataContainer and LRUDataContainer.  These two classes are  
>> where everything happens.  The javadocs should explain the details,  
>> but in a nutshell you can expect constant time operations for all  
>> puts, gets, removes, iterations.  :-)
>> Feedback on the impls would be handy.  :-)
>> Cheers
>> -- 
>> Manik Surtani
>> Lead, JBoss Cache
>> http://www.jbosscache.org
>> manik at jboss.org
>> ------------------------------------------------------------------------
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> -- 
> Galder Zamarreño
> Sr. Software Maintenance Engineer
> JBoss, a division of Red Hat

--
Manik Surtani
Lead, JBoss Cache
http://www.jbosscache.org
manik at jboss.org




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20090331/f633b044/attachment-0001.html 


More information about the infinispan-dev mailing list