Page对象池参数设置

The internal pooling of Tapestry pages now delegates the majority of actual pooling work to the commons-pool library. This means that your Tapestry application can now actually release idle pages from memory when they are no longer needed and hopefully increase the reliability/resources used of your production applications. All of the key configuration options are available in the HiveMind hivemind.FactoryDefaults configuration point which means that you can control these options via your servlet context parameters/.application file/hivemind/jvm system properties. The current options available are:
<contribution configuration-id="hivemind.FactoryDefaults">
<default symbol="org.apache.tapestry.page-pool-min-idle" value="1" />
<default symbol="org.apache.tapestry.page-pool-max-active" value="-1" />
<default symbol="org.apache.tapestry.page-pool-max-idle" value="-1" />
<default symbol="org.apache.tapestry.page-pool-evict-thread-sleep-minutes" value="4" />
<default symbol="org.apache.tapestry.page-pool-evict-idle-page-minutes" value="40" />
</contribution>

This configuration is based around using the GenericKeyedObjectPool implementation in particular. The key used to store each Tapestry page is a combination of the pageName and Locale of the page. The meaning and use of each value is as follows:

* org.apache.tapestry.page-pool-min-idle - The minimum number of page instances that must not be evicted for a given key. The default value of 1 means that we want at least one instance of each unique page to be available at any given time.
* org.apache.tapestry.page-pool-max-active - The maximum number of total pages that may be active in the pool. The default value of -1 indicates an unlimited number.
* org.apache.tapestry.page-pool-max-idle - The maximum number of idle pages that can exist in the pool. The -1 value here also means unlimited. (but doesn't mean they won't be evicted)
* org.apache.tapestry.page-pool-evict-thread-sleep-minutes - This pool launches a seperate thread which is responsible for managing and evicted expired pages from the pool when appropriate. This value controls the number of minutes this thread should sleep before checking for expired pages.
* org.apache.tapestry.page-pool-evict-idle-page-minutes - The number of minutes that a page must be idle for before being eligable for eviction from the pool.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值