|
|
@ -13,34 +13,20 @@ import io.dynamic.threadpool.common.model.PoolParameterInfo;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class ContentUtil {
|
|
|
|
public class ContentUtil {
|
|
|
|
|
|
|
|
|
|
|
|
/*public static String getPoolContent(PoolParameter parameter) {
|
|
|
|
|
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
|
|
|
|
String resultStr = stringBuilder.append(parameter.getCoreSize())
|
|
|
|
|
|
|
|
.append(parameter.getMaxSize())
|
|
|
|
|
|
|
|
.append(parameter.getQueueType())
|
|
|
|
|
|
|
|
.append(parameter.getCapacity())
|
|
|
|
|
|
|
|
.append(parameter.getKeepAliveTime())
|
|
|
|
|
|
|
|
.append(parameter.getIsAlarm())
|
|
|
|
|
|
|
|
.append(parameter.getCapacityAlarm())
|
|
|
|
|
|
|
|
.append(parameter.getLivenessAlarm())
|
|
|
|
|
|
|
|
.toString();
|
|
|
|
|
|
|
|
return resultStr;
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String getPoolContent(PoolParameter parameter) {
|
|
|
|
public static String getPoolContent(PoolParameter parameter) {
|
|
|
|
PoolParameterInfo poolInfo = new PoolParameterInfo();
|
|
|
|
PoolParameterInfo poolInfo = new PoolParameterInfo();
|
|
|
|
poolInfo.setTenantId(parameter.getTenantId());
|
|
|
|
poolInfo.setTenantId(parameter.getTenantId())
|
|
|
|
poolInfo.setItemId(parameter.getItemId());
|
|
|
|
.setItemId(parameter.getItemId())
|
|
|
|
poolInfo.setTpId(parameter.getTpId());
|
|
|
|
.setTpId(parameter.getTpId())
|
|
|
|
poolInfo.setCoreSize(parameter.getCoreSize());
|
|
|
|
.setCoreSize(parameter.getCoreSize())
|
|
|
|
poolInfo.setMaxSize(parameter.getMaxSize());
|
|
|
|
.setMaxSize(parameter.getMaxSize())
|
|
|
|
poolInfo.setQueueType(parameter.getQueueType());
|
|
|
|
.setQueueType(parameter.getQueueType())
|
|
|
|
poolInfo.setCapacity(parameter.getCapacity());
|
|
|
|
.setCapacity(parameter.getCapacity())
|
|
|
|
poolInfo.setKeepAliveTime(parameter.getKeepAliveTime());
|
|
|
|
.setKeepAliveTime(parameter.getKeepAliveTime())
|
|
|
|
poolInfo.setIsAlarm(parameter.getIsAlarm());
|
|
|
|
.setIsAlarm(parameter.getIsAlarm())
|
|
|
|
poolInfo.setCapacityAlarm(parameter.getCapacityAlarm());
|
|
|
|
.setCapacityAlarm(parameter.getCapacityAlarm())
|
|
|
|
poolInfo.setLivenessAlarm(parameter.getLivenessAlarm());
|
|
|
|
.setLivenessAlarm(parameter.getLivenessAlarm())
|
|
|
|
poolInfo.setRejectedType(parameter.getRejectedType());
|
|
|
|
.setRejectedType(parameter.getRejectedType());
|
|
|
|
return JSON.toJSONString(poolInfo);
|
|
|
|
return JSON.toJSONString(poolInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|