You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Danny Angus <Da...@slc.co.uk> on 2005/03/18 11:41:15 UTC

Janitor thread interval

Hi,

I've tried to find it in docs and by looking at the code but I can't find
anything about how the interval is set.
I want to increase it and see if it might help to resolve a problem we
have.
How do I change it?
Can it be changed in configuration or do I have to do it programatically?

d.




***************************************************************************
The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient (or responsible for delivery of the message to the intended recipient) please notify us immediately on 0141 306 2050 and delete the message from your computer. You may not copy or forward it or use or disclose its contents to any other person. As Internet communications are capable of data corruption Student Loans Company Limited does not accept any  responsibility for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice or opinions contained in an e-mail without obtaining written confirmation of it. Neither Student Loans Company Limited or the sender accepts any liability or responsibility for viruses as it is your responsibility to scan attachments (if any). Opinions and views expressed in this e-mail are those of the sender and may not reflect the opinions and views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for the presence of computer viruses.

**************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Janitor thread interval

Posted by Kent Tong <ke...@cpttm.org.mo>.
Danny Angus <Danny_Angus <at> slc.co.uk> writes:

> 
> Hi,
> 
> I've tried to find it in docs and by looking at the code but I can't find
> anything about how the interval is set.
> I want to increase it and see if it might help to resolve a problem we
> have.
> How do I change it?
> Can it be changed in configuration or do I have to do it programatically?

The way to do that (which is "condemned" by the doc) is:

int oneMinuteInMs = 60*1000;
JanitorThread.getSharedJanitorThread().setInterval(oneMinuteInMs);

If all you're trying to do is to make your pages stay long
in the pool, a better way is:

getEngine().getPool().setWindow(20);

By default the window is 10 and the janitor thread will sweep
the pool every 30 seconds, so the pages staying in the pool
for 300 seconds (5 minutes) will be removed. If we set the
window to say 20, then they can stay there for 10 minutes.



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org