Optimize the comments and logs of the dynamic common module.

pull/161/head
chen.ma 4 years ago
parent df3119d249
commit 3e9ce56b51

@ -7,7 +7,7 @@ import org.springframework.context.ApplicationContextAware;
import java.util.Map; import java.util.Map;
/** /**
* Spring IOC * Application context holder.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/20 18:49 * @date 2021/6/20 18:49
@ -22,7 +22,7 @@ public class ApplicationContextHolder implements ApplicationContextAware {
} }
/** /**
* IOC Bean * Get ioc container bean by type.
* *
* @param clazz * @param clazz
* @param <T> * @param <T>
@ -33,7 +33,7 @@ public class ApplicationContextHolder implements ApplicationContextAware {
} }
/** /**
* & IOC Bean * Get ioc container bean by name and type.
* *
* @param name * @param name
* @param clazz * @param clazz
@ -45,7 +45,7 @@ public class ApplicationContextHolder implements ApplicationContextAware {
} }
/** /**
* IOC Bean * Get a set of ioc container beans by type.
* *
* @param clazz * @param clazz
* @param <T> * @param <T>

@ -1,7 +1,7 @@
package com.github.dynamic.threadpool.common.constant; package com.github.dynamic.threadpool.common.constant;
/** /**
* Constants * Constants.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/16 23:01 * @date 2021/6/16 23:01

@ -5,7 +5,7 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadFactory;
/** /**
* Executor Factory. * Executor factory.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/23 18:35 * @date 2021/6/23 18:35
@ -24,4 +24,5 @@ public class ExecutorFactory {
return executorService; return executorService;
} }
} }
} }

@ -59,4 +59,5 @@ public class ThreadPoolManager {
map.get(group).add(executor); map.get(group).add(executor);
} }
} }
} }

@ -6,7 +6,7 @@ import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
/** /**
* * Global remote pool info.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/23 21:08 * @date 2021/6/23 21:08
@ -18,67 +18,67 @@ public class GlobalRemotePoolInfo implements Serializable {
private static final long serialVersionUID = 5447003335557127308L; private static final long serialVersionUID = 5447003335557127308L;
/** /**
* * tenantId
*/ */
private String tenantId; private String tenantId;
/** /**
* ID * itemId
*/ */
private String itemId; private String itemId;
/** /**
* 线 * tpId
*/ */
private String tpId; private String tpId;
/** /**
* 线 * coreSize
*/ */
private Integer coreSize; private Integer coreSize;
/** /**
* 线 * maxSize
*/ */
private Integer maxSize; private Integer maxSize;
/** /**
* * queueType
*/ */
private Integer queueType; private Integer queueType;
/** /**
* * capacity
*/ */
private Integer capacity; private Integer capacity;
/** /**
* 线 * keepAliveTime
*/ */
private Integer keepAliveTime; private Integer keepAliveTime;
/** /**
* * isAlarm
*/ */
private Integer isAlarm; private Integer isAlarm;
/** /**
* * capacityAlarm
*/ */
private Integer capacityAlarm; private Integer capacityAlarm;
/** /**
* * livenessAlarm
*/ */
private Integer livenessAlarm; private Integer livenessAlarm;
/** /**
* MD5 * md5
*/ */
private String md5; private String md5;
/** /**
* * content
*/ */
private String content; private String content;

@ -7,7 +7,7 @@ import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
* Instance Info. * Instance info.
* *
* @author chen.ma * @author chen.ma
* @date 2021/7/13 22:10 * @date 2021/7/13 22:10

@ -1,7 +1,7 @@
package com.github.dynamic.threadpool.common.model; package com.github.dynamic.threadpool.common.model;
/** /**
* Pool Parameter. * Pool parameter.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/24 16:04 * @date 2021/6/24 16:04

@ -6,7 +6,7 @@ import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
/** /**
* 线 * Thread pool parameter info.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/16 23:18 * @date 2021/6/16 23:18
@ -18,67 +18,67 @@ public class PoolParameterInfo implements PoolParameter, Serializable {
private static final long serialVersionUID = -7123935122108553864L; private static final long serialVersionUID = -7123935122108553864L;
/** /**
* * tenantId
*/ */
private String tenantId; private String tenantId;
/** /**
* Id * itemId
*/ */
private String itemId; private String itemId;
/** /**
* 线 Id * tpId
*/ */
private String tpId; private String tpId;
/** /**
* * content
*/ */
private String content; private String content;
/** /**
* 线 * coreSize
*/ */
private Integer coreSize; private Integer coreSize;
/** /**
* 线 * maxSize
*/ */
private Integer maxSize; private Integer maxSize;
/** /**
* * queueType
*/ */
private Integer queueType; private Integer queueType;
/** /**
* * capacity
*/ */
private Integer capacity; private Integer capacity;
/** /**
* 线 * keepAliveTime
*/ */
private Integer keepAliveTime; private Integer keepAliveTime;
/** /**
* * rejectedType
*/ */
private Integer rejectedType; private Integer rejectedType;
/** /**
* * isAlarm
*/ */
private Integer isAlarm; private Integer isAlarm;
/** /**
* * capacityAlarm
*/ */
private Integer capacityAlarm; private Integer capacityAlarm;
/** /**
* * livenessAlarm
*/ */
private Integer livenessAlarm; private Integer livenessAlarm;

@ -6,7 +6,7 @@ import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
/** /**
* Pool Run State Info. * Pool run state info.
* *
* @author chen.ma * @author chen.ma
* @date 2021/7/7 18:57 * @date 2021/7/7 18:57
@ -16,77 +16,77 @@ import java.io.Serializable;
public class PoolRunStateInfo implements Serializable { public class PoolRunStateInfo implements Serializable {
/** /**
* * currentLoad
*/ */
private String currentLoad; private String currentLoad;
/** /**
* * peakLoad
*/ */
private String peakLoad; private String peakLoad;
/** /**
* 线 ID * tpId
*/ */
private String tpId; private String tpId;
/** /**
* 线 * coreSize
*/ */
private Integer coreSize; private Integer coreSize;
/** /**
* 线 * maximumSize
*/ */
private Integer maximumSize; private Integer maximumSize;
/** /**
* 线线 * poolSize
*/ */
private Integer poolSize; private Integer poolSize;
/** /**
* 线 * activeSize
*/ */
private Integer activeSize; private Integer activeSize;
/** /**
* 线线 * The maximum number of threads that enter the thread pool at the same time
*/ */
private Integer largestPoolSize; private Integer largestPoolSize;
/** /**
* * queueType
*/ */
private String queueType; private String queueType;
/** /**
* * queueCapacity
*/ */
private Integer queueCapacity; private Integer queueCapacity;
/** /**
* * queueSize
*/ */
private Integer queueSize; private Integer queueSize;
/** /**
* * queueRemainingCapacity
*/ */
private Integer queueRemainingCapacity; private Integer queueRemainingCapacity;
/** /**
* 线 * completedTaskCount
*/ */
private Long completedTaskCount; private Long completedTaskCount;
/** /**
* * rejectCount
*/ */
private Integer rejectCount; private Integer rejectCount;
/** /**
* Host * host
*/ */
private String host; private String host;

@ -7,7 +7,7 @@ import java.util.Collection;
import java.util.Map; import java.util.Map;
/** /**
* * Assert.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/29 09:36 * @date 2021/6/29 09:36

@ -6,7 +6,7 @@ import com.github.dynamic.threadpool.common.model.PoolParameter;
import com.github.dynamic.threadpool.common.model.PoolParameterInfo; import com.github.dynamic.threadpool.common.model.PoolParameterInfo;
/** /**
* Content Util. * Content util.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/24 16:13 * @date 2021/6/24 16:13
@ -40,4 +40,5 @@ public class ContentUtil {
.toString(); .toString();
return resultStr; return resultStr;
} }
} }

@ -3,7 +3,7 @@ package com.github.dynamic.threadpool.common.toolkit;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
* Group Key * Group key.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/24 21:12 * @date 2021/6/24 21:12

@ -13,7 +13,7 @@ import java.util.List;
import static com.github.dynamic.threadpool.common.constant.Constants.WORD_SEPARATOR; import static com.github.dynamic.threadpool.common.constant.Constants.WORD_SEPARATOR;
/** /**
* MD5 Util. * MD5 util.
* *
* @author chen.ma * @author chen.ma
* @date 2021/6/22 17:55 * @date 2021/6/22 17:55

@ -6,7 +6,7 @@ import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
/** /**
* * Result.
* *
* @author chen.ma * @author chen.ma
* @date 2021/3/19 16:12 * @date 2021/3/19 16:12

@ -4,7 +4,7 @@ import com.github.dynamic.threadpool.common.web.exception.ErrorCodeEnum;
import com.github.dynamic.threadpool.common.web.exception.ServiceException; import com.github.dynamic.threadpool.common.web.exception.ServiceException;
/** /**
* Result * Results.
* *
* @author chen.ma * @author chen.ma
* @date 2021/3/19 16:12 * @date 2021/3/19 16:12

@ -1,7 +1,7 @@
package com.github.dynamic.threadpool.common.web.exception; package com.github.dynamic.threadpool.common.web.exception;
/** /**
* * Error code enum.
* *
* @author chen.ma * @author chen.ma
* @date 2021/3/19 16:07 * @date 2021/3/19 16:07
@ -16,7 +16,7 @@ public enum ErrorCodeEnum {
@Override @Override
public String getMessage() { public String getMessage() {
return "未知错误"; return "UNKNOWN_ERROR";
} }
}, },
@ -28,7 +28,7 @@ public enum ErrorCodeEnum {
@Override @Override
public String getMessage() { public String getMessage() {
return "参数错误"; return "VALIDATION_ERROR";
} }
}, },
@ -40,7 +40,7 @@ public enum ErrorCodeEnum {
@Override @Override
public String getMessage() { public String getMessage() {
return "服务异常"; return "SERVICE_ERROR";
} }
}, },
@ -52,7 +52,7 @@ public enum ErrorCodeEnum {
@Override @Override
public String getMessage() { public String getMessage() {
return "未找到异常"; return "NOT_FOUND";
} }
}; };

@ -4,7 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* * Service exception.
* *
* @author chen.ma * @author chen.ma
* @date 2021/3/19 16:14 * @date 2021/3/19 16:14

Loading…
Cancel
Save