[jboss-dev-forums] [Design of JBossCache] - Eviction thread behaviour

manik.surtani@jboss.com do-not-reply at jboss.com
Fri Oct 20 13:01:45 EDT 2006


As reported in 

   http://jira.jboss.com/jira/browse/JBCACHE-794

there are a few issues with the eviction thread's behaviour in concept.

The bits I'm specifically concerned about are:

1)  Should the eviction thread always use a lock acquisition timeout of 0, simply because if anyone else has a lock on the node being evicted then it should not be evicted?  Since this is algorithm-specific, the BaseEvictionPolicy's evict() method should return an appropriate value if the eviction failed because of a timeout (rather than throw an exception, as this may be quite common with a timeout of 0)

2)  BaseEvictionAlgorithm.evictCacheNode(), which calls BaseEvictionPolicy.evict(), would have to decide on whether a failure to evict because of a timeout should result in the eviction call being put back on the queue.  In the case of an LRU type policy, this probably should *not* happen since the fact that the node is locked, it should be treated as a nodeVisited event and this eviction call should be removed from the eviction queue.

What do people think about this?

Cheers,
Manik

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979697#3979697

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979697



More information about the jboss-dev-forums mailing list