cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <>
Subject RE: my doubts about the current CocoonStoreJanitor/StoreJanitorImpl
Date Thu, 27 Jul 2006 13:28:28 GMT
> <snip/>
> >>> So, in the StoreJanitor, I check now wether the store is 
> >> instanceof EHDefaultStore,
> >>
> >> That's a really bad idea, in and by itself. Never rely on concrete 
> >> implementations, always work against contracts (interfaces).
> > 
> > Ok. I try and see if there is another way to get this in. I 
> still have to do the following changes then
> > 
> > 1) StoreJanitor to only free cache/memory from stores configured to
> > 2) Change the EHDefaultStore the "public int size()"  to 
> return the memoryStoreSize()
> > 3) Change the free() in EHDefaultStore according to the 
> correct eviction policy. This might need changes in the ehcache. 
> > 
> > I think this meets your requirements as well, right?

Hello, I have been thinking about a solution for point (1), to have the StoreJanitor only
free memory from caches you did not define as "not to free from". It is not hard at all to
implement, but I am not sure about the "politics", so here are my concerns:

Ideally I would like:

1) To change the StoreJanitor, to free a percentage of all caches at ones, and not one after
another. Also, only from caches that have a parameter that says that they a "freeable" or
something (and for backwardscompatibility of course also when the param is missing)

2) To change the Store interface that store implementations should have a method isFreeable()
3) Then all store implementations should implement isFreeable().

Now, I suppose this is of course NOT least I think. I suppose a contract is
a contract, right? And if we would like to change it, it is an excalibur project.

How can I achieve this?

Regards Ard

> Looks good.
> Vadim

View raw message