You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.5 KiB
74 lines
2.5 KiB
package com.fr.plugin.pack.conf; |
|
|
|
import com.fr.config.ConfigContext; |
|
import com.fr.config.DefaultConfiguration; |
|
import com.fr.config.Identifier; |
|
import com.fr.config.Status; |
|
import com.fr.config.Visualization; |
|
import com.fr.config.holder.Conf; |
|
import com.fr.config.holder.factory.Holders; |
|
|
|
/** |
|
* @author Jonas |
|
* @version 5.1.3 |
|
* Created by Jonas on 2020-10-20 |
|
*/ |
|
@Visualization(category = "打包插件参数") |
|
public class PackPluginConfig extends DefaultConfiguration { |
|
private static volatile PackPluginConfig config = null; |
|
|
|
// sql查询超时时间(JDBC属性)单位秒 |
|
@Identifier(value = "sqlQueryTimeout", status = Status.SHOW, name = "SQL查询超时时间", description = "单位秒(JDBC设置queryTimeout)") |
|
private Conf<Integer> sqlQueryTimeout = Holders.simple(60); |
|
|
|
// 组件查询超时时间单位毫秒 |
|
@Identifier(value = "widgetQueryTimeout", status = Status.SHOW, name = "组件查询超时时间", description = "单位毫秒") |
|
private Conf<Integer> widgetQueryTimeout = Holders.simple(3 * 60 * 1000); |
|
|
|
// 最大模板并发访问度 |
|
@Identifier(value = "reportQueryMax", status = Status.SHOW, name = "最大模板并发访问度", description = "模板并发个数") |
|
private Conf<Integer> reportQueryMax = Holders.simple(3); |
|
|
|
// 最大组件并发组件并发访问度 |
|
@Identifier(value = "widgetQueryMax", status = Status.SHOW, name = "最大组件并发组件并发访问度", description = "组件并发个数") |
|
private Conf<Integer> widgetQueryMax = Holders.simple(6); |
|
|
|
public static PackPluginConfig getInstance() { |
|
if (config == null) { |
|
config = ConfigContext.getConfigInstance(PackPluginConfig.class); |
|
} |
|
return config; |
|
} |
|
|
|
public int getSqlQueryTimeout() { |
|
return sqlQueryTimeout.get(); |
|
} |
|
|
|
public void setSqlQueryTimeout(int sqlQueryTimeout) { |
|
this.sqlQueryTimeout.set(sqlQueryTimeout); |
|
} |
|
|
|
public int getWidgetQueryTimeout() { |
|
return widgetQueryTimeout.get(); |
|
} |
|
|
|
public void setWidgetQueryTimeout(int widgetQueryTimeout) { |
|
this.widgetQueryTimeout.set(widgetQueryTimeout); |
|
} |
|
|
|
public int getReportQueryMax() { |
|
return reportQueryMax.get(); |
|
} |
|
|
|
public void setReportQueryMax(int reportQueryMax) { |
|
this.reportQueryMax.set(reportQueryMax); |
|
} |
|
|
|
public int getWidgetQueryMax() { |
|
return widgetQueryMax.get(); |
|
} |
|
|
|
public void setWidgetQueryMax(int widgetQueryMax) { |
|
this.widgetQueryMax.set(widgetQueryMax); |
|
} |
|
}
|
|
|