use of com.haulmont.cuba.web.WebConfig in project cuba by cuba-platform.
the class WebBackgroundWorker method createThreadPoolExecutor.
protected void createThreadPoolExecutor() {
if (executorService != null) {
return;
}
WebConfig webConfig = configuration.getConfig(WebConfig.class);
this.executorService = new ThreadPoolExecutor(webConfig.getMinBackgroundThreadsCount(), webConfig.getMaxActiveBackgroundTasksCount(), 10L, TimeUnit.MINUTES, new LinkedBlockingQueue<>(), new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_PREFIX + "%d").build());
}
use of com.haulmont.cuba.web.WebConfig in project cuba by cuba-platform.
the class WebAbstractTable method setClientCaching.
protected void setClientCaching(T component) {
Configuration configuration = AppBeans.get(Configuration.NAME);
WebConfig webConfig = configuration.getConfig(WebConfig.class);
double cacheRate = webConfig.getTableCacheRate();
if (cacheRate >= 0) {
component.setCacheRate(cacheRate);
}
int pageLength = webConfig.getTablePageLength();
if (pageLength >= 0) {
component.setPageLength(pageLength);
}
}
Aggregations