From df628c5a8f017cc43a35b870d1b8663ac71d4e88 Mon Sep 17 00:00:00 2001 From: "chen.ma" Date: Sun, 7 Aug 2022 00:11:34 +0800 Subject: [PATCH] hippo4j-config code naming and log optimization --- .../hippo4j/config/config/CommonConfig.java | 4 -- .../config/config/MyMetaObjectHandler.java | 5 --- .../config/config/MybatisPlusConfig.java | 4 -- .../config/config/NettyServerConfig.java | 3 ++ .../config/ServerBootstrapProperties.java | 6 +-- .../config/controller/ConfigController.java | 12 +----- .../hippo4j/config/event/AbstractEvent.java | 4 -- .../config/event/AbstractSlowEvent.java | 4 -- .../config/event/ConfigDataChangeEvent.java | 5 --- .../config/event/LocalDataChangeEvent.java | 8 +--- .../config/mapper/ConfigInfoMapper.java | 3 -- .../config/mapper/ConfigInstanceMapper.java | 3 -- .../config/mapper/DashboardMapper.java | 4 -- .../config/mapper/HisRunDataMapper.java | 16 +++----- .../hippo4j/config/mapper/ItemInfoMapper.java | 3 -- .../config/mapper/NotifyInfoMapper.java | 3 -- .../config/mapper/OperationLogMapper.java | 3 -- .../config/mapper/TenantInfoMapper.java | 3 -- .../cn/hippo4j/config/model/CacheItem.java | 4 -- .../hippo4j/config/model/ConfigAllInfo.java | 4 -- .../cn/hippo4j/config/model/ConfigInfo.java | 4 -- .../hippo4j/config/model/ConfigInfoBase.java | 4 -- .../config/model/ConfigInstanceInfo.java | 4 -- .../hippo4j/config/model/HisRunDataInfo.java | 4 -- .../cn/hippo4j/config/model/ItemInfo.java | 4 -- .../cn/hippo4j/config/model/NotifyInfo.java | 6 +-- .../cn/hippo4j/config/model/TenantInfo.java | 4 -- .../model/biz/item/ItemQueryReqDTO.java | 3 -- .../config/model/biz/item/ItemRespDTO.java | 17 ++++---- .../config/model/biz/item/ItemSaveReqDTO.java | 14 +++---- .../model/biz/item/ItemUpdateReqDTO.java | 4 -- .../model/biz/log/LogRecordQueryReqDTO.java | 10 ++--- .../model/biz/log/LogRecordRespDTO.java | 15 +++---- .../biz/monitor/MonitorActiveRespDTO.java | 22 +++++------ .../model/biz/monitor/MonitorQueryReqDTO.java | 14 +++---- .../model/biz/monitor/MonitorRespDTO.java | 32 +++++++-------- .../model/biz/notify/NotifyListRespDTO.java | 8 +--- .../model/biz/notify/NotifyQueryReqDTO.java | 14 +++---- .../config/model/biz/notify/NotifyReqDTO.java | 27 +++++++------ .../model/biz/notify/NotifyRespDTO.java | 35 ++++++++--------- .../model/biz/tenant/TenantQueryReqDTO.java | 5 +-- .../model/biz/tenant/TenantRespDTO.java | 17 ++++---- .../model/biz/tenant/TenantSaveReqDTO.java | 14 +++---- .../model/biz/tenant/TenantUpdateReqDTO.java | 16 +++----- .../biz/threadpool/ThreadPoolDelReqDTO.java | 10 ++--- .../biz/threadpool/ThreadPoolQueryReqDTO.java | 3 -- .../biz/threadpool/ThreadPoolRespDTO.java | 39 +++++++++---------- .../ThreadPoolSaveOrUpdateReqDTO.java | 32 +++++++-------- .../AbstractMonitorDataExecuteStrategy.java | 4 -- .../monitor/DefaultMonitorDataResolver.java | 4 -- .../monitor/QueryMonitorExecuteChoose.java | 5 --- .../config/monitor/RuntimeDataResolver.java | 4 -- .../monitor/TimeCleanHistoryDataTask.java | 6 --- .../config/netty/MonitorNettyServer.java | 14 ++----- .../hippo4j/config/netty/ServerHandler.java | 9 +---- .../config/notify/DefaultPublisher.java | 9 +---- .../config/notify/DefaultSharePublisher.java | 5 --- .../hippo4j/config/notify/EventPublisher.java | 4 -- .../hippo4j/config/notify/NotifyCenter.java | 10 ----- .../listener/AbstractSmartSubscriber.java | 4 -- .../notify/listener/AbstractSubscriber.java | 4 -- .../config/service/LongPollingService.java | 4 +- .../service/ThreadPoolAdapterService.java | 2 +- .../config/service/biz/ConfigService.java | 3 -- .../config/service/biz/HisRunDataService.java | 5 --- .../config/service/biz/ItemService.java | 4 -- .../config/service/biz/NotifyService.java | 18 ++++----- .../config/service/biz/TenantService.java | 4 -- .../config/service/biz/ThreadPoolService.java | 4 -- .../biz/impl/HisRunDataServiceImpl.java | 18 --------- .../service/biz/impl/ItemServiceImpl.java | 14 +------ .../service/biz/impl/NotifyServiceImpl.java | 5 +-- .../biz/impl/OperationLogServiceImpl.java | 3 -- .../service/biz/impl/TenantServiceImpl.java | 5 --- .../ClientCloseHookRemoveConfigCache.java | 13 ++----- .../cn/hippo4j/config/toolkit/BeanUtil.java | 6 +-- .../cn/hippo4j/config/toolkit/ClassUtil.java | 4 -- .../config/toolkit/ConfigExecutor.java | 4 -- .../cn/hippo4j/config/toolkit/EnvUtil.java | 7 ---- .../cn/hippo4j/config/toolkit/MapUtil.java | 11 +----- .../hippo4j/config/toolkit/Md5ConfigUtil.java | 12 ------ .../hippo4j/config/toolkit/RequestUtil.java | 4 -- .../config/toolkit/SimpleReadWriteLock.java | 4 -- .../config/toolkit/SingletonRepository.java | 4 -- 84 files changed, 179 insertions(+), 543 deletions(-) diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/config/CommonConfig.java b/hippo4j-config/src/main/java/cn/hippo4j/config/config/CommonConfig.java index 2546b521..b8ec6643 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/config/CommonConfig.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/config/CommonConfig.java @@ -28,9 +28,6 @@ import static cn.hippo4j.common.constant.Constants.AVAILABLE_PROCESSORS; /** * Common config. - * - * @author chen.ma - * @date 2021/7/19 21:03 */ @Configuration public class CommonConfig { @@ -53,5 +50,4 @@ public class CommonConfig { monitorThreadPool.setAwaitTerminationMillis(5000); return monitorThreadPool; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/config/MyMetaObjectHandler.java b/hippo4j-config/src/main/java/cn/hippo4j/config/config/MyMetaObjectHandler.java index 8e612bec..67fee387 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/config/MyMetaObjectHandler.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/config/MyMetaObjectHandler.java @@ -27,9 +27,6 @@ import java.util.Date; /** * Meta object handler. - * - * @author chen.ma - * @date 2021/7/1 22:43 */ @Slf4j @Component @@ -39,7 +36,6 @@ public class MyMetaObjectHandler implements MetaObjectHandler { public void insertFill(MetaObject metaObject) { this.strictInsertFill(metaObject, "gmtCreate", Date.class, new Date()); this.strictInsertFill(metaObject, "gmtModified", Date.class, new Date()); - this.strictInsertFill(metaObject, "delFlag", Integer.class, DelEnum.NORMAL.getIntCode()); } @@ -47,5 +43,4 @@ public class MyMetaObjectHandler implements MetaObjectHandler { public void updateFill(MetaObject metaObject) { this.strictInsertFill(metaObject, "gmtModified", Date.class, new Date()); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/config/MybatisPlusConfig.java b/hippo4j-config/src/main/java/cn/hippo4j/config/config/MybatisPlusConfig.java index d4ed3313..82455fdd 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/config/MybatisPlusConfig.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/config/MybatisPlusConfig.java @@ -25,9 +25,6 @@ import org.springframework.context.annotation.Configuration; /** * Mybatis plus config. - * - * @author chen.ma - * @date 2021/6/29 20:22 */ @Configuration public class MybatisPlusConfig { @@ -38,5 +35,4 @@ public class MybatisPlusConfig { interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); return interceptor; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/config/NettyServerConfig.java b/hippo4j-config/src/main/java/cn/hippo4j/config/config/NettyServerConfig.java index 7f58a6b4..92fdea43 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/config/NettyServerConfig.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/config/NettyServerConfig.java @@ -25,6 +25,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * Netty server config. + */ @Configuration @ConditionalOnProperty(name = "hippo4j.core.monitor.report-type", havingValue = "netty") public class NettyServerConfig { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/config/ServerBootstrapProperties.java b/hippo4j-config/src/main/java/cn/hippo4j/config/config/ServerBootstrapProperties.java index 9f9910b7..d8d855f7 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/config/ServerBootstrapProperties.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/config/ServerBootstrapProperties.java @@ -25,9 +25,6 @@ import org.springframework.context.annotation.Configuration; /** * Server bootstrap properties. - * - * @author chen.ma - * @date 2021/12/22 08:01 */ @Slf4j @Getter @@ -48,5 +45,8 @@ public class ServerBootstrapProperties { */ private Integer cleanHistoryDataPeriod = 30; + /** + * Netty server port. + */ private String nettyServerPort = "8899"; } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/controller/ConfigController.java b/hippo4j-config/src/main/java/cn/hippo4j/config/controller/ConfigController.java index d3a40e85..b2f03cba 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/controller/ConfigController.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/controller/ConfigController.java @@ -39,9 +39,6 @@ import java.util.Map; /** * Server configuration controller. - * - * @author chen.ma - * @date 2021/6/20 13:53 */ @RestController @AllArgsConstructor @@ -53,8 +50,7 @@ public class ConfigController { private final ConfigServletInner configServletInner; @GetMapping - public Result detailConfigInfo( - @RequestParam("tpId") String tpId, + public Result detailConfigInfo(@RequestParam("tpId") String tpId, @RequestParam("itemId") String itemId, @RequestParam("namespace") String namespace, @RequestParam(value = "instanceId", required = false) String instanceId) { @@ -73,21 +69,17 @@ public class ConfigController { @PostMapping("/listener") public void listener(HttpServletRequest request, HttpServletResponse response) { request.setAttribute("org.apache.catalina.ASYNC_SUPPORTED", true); - String probeModify = request.getParameter(Constants.LISTENING_CONFIGS); if (StringUtils.isEmpty(probeModify)) { throw new IllegalArgumentException("invalid probeModify"); } - probeModify = URLDecoder.decode(probeModify, Constants.ENCODE); - Map clientMd5Map; try { clientMd5Map = Md5ConfigUtil.getClientMd5Map(probeModify); } catch (Throwable e) { throw new IllegalArgumentException("invalid probeModify"); } - configServletInner.doPollingConfig(request, response, clientMd5Map, probeModify.length()); } @@ -97,8 +89,6 @@ public class ConfigController { if (StrUtil.isNotBlank(groupKey)) { ConfigCacheService.removeConfigCache(groupKey); } - return Results.success(); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractEvent.java b/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractEvent.java index baf065b4..3c35831a 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractEvent.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractEvent.java @@ -22,9 +22,6 @@ import java.util.concurrent.atomic.AtomicLong; /** * An abstract class for event. - * - * @author chen.ma - * @date 2021/6/23 18:59 */ public abstract class AbstractEvent implements Serializable { @@ -40,5 +37,4 @@ public abstract class AbstractEvent implements Serializable { public long sequence() { return sequence; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractSlowEvent.java b/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractSlowEvent.java index a79a0116..48fa70e5 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractSlowEvent.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/event/AbstractSlowEvent.java @@ -19,9 +19,6 @@ package cn.hippo4j.config.event; /** * Slow event. - * - * @author chen.ma - * @date 2021/6/23 19:05 */ public abstract class AbstractSlowEvent extends AbstractEvent { @@ -29,5 +26,4 @@ public abstract class AbstractSlowEvent extends AbstractEvent { public long sequence() { return 0; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/event/ConfigDataChangeEvent.java b/hippo4j-config/src/main/java/cn/hippo4j/config/event/ConfigDataChangeEvent.java index 6ba10e23..0c3cd1e1 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/event/ConfigDataChangeEvent.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/event/ConfigDataChangeEvent.java @@ -21,9 +21,6 @@ import org.springframework.util.StringUtils; /** * Config data change event. - * - * @author chen.ma - * @date 2021/6/24 23:35 */ public class ConfigDataChangeEvent extends AbstractEvent { @@ -39,11 +36,9 @@ public class ConfigDataChangeEvent extends AbstractEvent { if (StringUtils.isEmpty(tenantId) || StringUtils.isEmpty(itemId) || StringUtils.isEmpty(tpId)) { throw new IllegalArgumentException("DataId is null or group is null"); } - this.tenantId = tenantId; this.itemId = itemId; this.tpId = tpId; this.lastModifiedTs = gmtModified; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/event/LocalDataChangeEvent.java b/hippo4j-config/src/main/java/cn/hippo4j/config/event/LocalDataChangeEvent.java index f4487e11..652d2daa 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/event/LocalDataChangeEvent.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/event/LocalDataChangeEvent.java @@ -19,19 +19,16 @@ package cn.hippo4j.config.event; /** * Local data change event. - * - * @author chen.ma - * @date 2021/6/23 19:13 */ public class LocalDataChangeEvent extends AbstractEvent { /** - * 租户+项目+线程池 + * Tenant + Item + Thread-pool */ public final String groupKey; /** - * 客户端实例唯一标识 + * Client instance unique identifier */ public final String identify; @@ -39,5 +36,4 @@ public class LocalDataChangeEvent extends AbstractEvent { this.identify = identify; this.groupKey = groupKey; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInfoMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInfoMapper.java index e74fe5e1..32184624 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInfoMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInfoMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Config info mapper. - * - * @author chen.ma - * @date 2021/6/29 22:44 */ @Mapper public interface ConfigInfoMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInstanceMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInstanceMapper.java index 658e7873..39eecfa9 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInstanceMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ConfigInstanceMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Config instance mapper. - * - * @author chen.ma - * @date 2021/12/5 19:18 */ @Mapper public interface ConfigInstanceMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/DashboardMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/DashboardMapper.java index 06e1f810..d4957d95 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/DashboardMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/DashboardMapper.java @@ -21,11 +21,7 @@ import org.apache.ibatis.annotations.Mapper; /** * Dashboard mapper. - * - * @author chen.ma - * @date 2021/12/11 15:16 */ @Mapper public interface DashboardMapper { - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/HisRunDataMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/HisRunDataMapper.java index e9a9675c..7918828a 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/HisRunDataMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/HisRunDataMapper.java @@ -28,9 +28,6 @@ import java.util.List; /** * His run data mapper. - * - * @author chen.ma - * @date 2021/12/10 21:33 */ @Mapper public interface HisRunDataMapper extends BaseMapper { @@ -71,34 +68,33 @@ public interface HisRunDataMapper extends BaseMapper { class ThreadPoolTaskRanking { /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 线程池id + * Tp id */ private String tpId; /** - * 执行任务数 + * Max completed task count */ private Long maxCompletedTaskCount; /** - * 队列元素 + * Max queue size */ private Long maxQueueSize; /** - * 拒绝次数 + * Max reject count */ private Long maxRejectCount; - } } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ItemInfoMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ItemInfoMapper.java index 8ba7d774..6fbe8617 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ItemInfoMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/ItemInfoMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Item info mapper. - * - * @author chen.ma - * @date 2021/6/29 21:53 */ @Mapper public interface ItemInfoMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/NotifyInfoMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/NotifyInfoMapper.java index c415923b..04f5fe5c 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/NotifyInfoMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/NotifyInfoMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Notify info mapper. - * - * @author chen.ma - * @date 2021/11/17 22:04 */ @Mapper public interface NotifyInfoMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/OperationLogMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/OperationLogMapper.java index 4e30d7d8..2c9d60ea 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/OperationLogMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/OperationLogMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Operation log mapper. - * - * @author chen.ma - * @date 2021/10/24 21:01 */ @Mapper public interface OperationLogMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/TenantInfoMapper.java b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/TenantInfoMapper.java index 6b39ec6b..f6da4213 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/TenantInfoMapper.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/mapper/TenantInfoMapper.java @@ -23,9 +23,6 @@ import org.apache.ibatis.annotations.Mapper; /** * Tenant info mapper. - * - * @author chen.ma - * @date 2021/6/29 22:44 */ @Mapper public interface TenantInfoMapper extends BaseMapper { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/CacheItem.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/CacheItem.java index c79f5f97..c397fed3 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/CacheItem.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/CacheItem.java @@ -26,9 +26,6 @@ import lombok.Setter; /** * Cache item. - * - * @author chen.ma - * @date 2021/6/24 21:23 */ @Getter @Setter @@ -58,5 +55,4 @@ public class CacheItem { this.md5 = Md5Util.getTpContentMd5(configAllInfo); this.groupKey = SingletonRepository.DataIdGroupIdCache.getSingleton(groupKey); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigAllInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigAllInfo.java index 373b2233..5c8f74e3 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigAllInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigAllInfo.java @@ -30,9 +30,6 @@ import java.util.Date; /** * Config all info. - * - * @author chen.ma - * @date 2021/6/20 15:14 */ @Data @TableName("config") @@ -73,5 +70,4 @@ public class ConfigAllInfo extends ConfigInfo implements ThreadPoolParameter { public String toString() { return JSONUtil.toJSONString(this); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfo.java index e19521ef..7bafc089 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfo.java @@ -21,13 +21,9 @@ import lombok.Data; /** * Config info. - * - * @author chen.ma - * @date 2021/6/20 15:59 */ @Data public class ConfigInfo extends ConfigInfoBase { private static final long serialVersionUID = -3504960832191834675L; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfoBase.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfoBase.java index 479ed7c7..b1a98e67 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfoBase.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInfoBase.java @@ -26,9 +26,6 @@ import java.io.Serializable; /** * Config info base. - * - * @author chen.ma - * @date 2021/6/20 14:05 */ @Data public class ConfigInfoBase implements Serializable { @@ -117,5 +114,4 @@ public class ConfigInfoBase implements Serializable { */ @JsonIgnore private String content; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInstanceInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInstanceInfo.java index 2d0c15b3..7d4b52a1 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInstanceInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ConfigInstanceInfo.java @@ -24,9 +24,6 @@ import java.util.Date; /** * Config instance info. - * - * @author chen.ma - * @date 2021/12/5 19:19 */ @Data @TableName("inst_config") @@ -73,5 +70,4 @@ public class ConfigInstanceInfo { */ @TableField(fill = FieldFill.INSERT) private Date gmtCreate; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/HisRunDataInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/HisRunDataInfo.java index 998ffeb6..80c9f758 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/HisRunDataInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/HisRunDataInfo.java @@ -24,9 +24,6 @@ import java.util.Date; /** * His run data info. - * - * @author chen.ma - * @date 2021/12/10 21:30 */ @Data @TableName("his_run_data") @@ -119,5 +116,4 @@ public class HisRunDataInfo { */ @TableField(fill = FieldFill.INSERT_UPDATE) private Date gmtModified; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ItemInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ItemInfo.java index fa821d51..90995085 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/ItemInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/ItemInfo.java @@ -24,9 +24,6 @@ import java.util.Date; /** * Item info. - * - * @author chen.ma - * @date 2021/6/29 21:53 */ @Data @TableName("item") @@ -81,5 +78,4 @@ public class ItemInfo { @TableLogic @TableField(fill = FieldFill.INSERT) private Integer delFlag; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/NotifyInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/NotifyInfo.java index 996286fb..aaabc6e8 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/NotifyInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/NotifyInfo.java @@ -23,10 +23,7 @@ import lombok.Data; import java.util.Date; /** - * 通知管理. - * - * @author chen.ma - * @date 2021/11/17 22:03 + * Notify info. */ @Data @TableName("notify") @@ -101,5 +98,4 @@ public class NotifyInfo { */ @TableField(fill = FieldFill.INSERT) private Integer delFlag; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/TenantInfo.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/TenantInfo.java index 7b30d79b..768d988b 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/TenantInfo.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/TenantInfo.java @@ -24,9 +24,6 @@ import java.util.Date; /** * Tenant info. - * - * @author chen.ma - * @date 2021/6/29 22:04 */ @Data @TableName("tenant") @@ -75,5 +72,4 @@ public class TenantInfo { */ @TableField(fill = FieldFill.INSERT) private Integer delFlag; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemQueryReqDTO.java index 46de7a22..570125d9 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemQueryReqDTO.java @@ -22,9 +22,6 @@ import lombok.Data; /** * Item query req dto. - * - * @author chen.ma - * @date 2021/6/29 22:28 */ @Data public class ItemQueryReqDTO extends Page { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemRespDTO.java index 0c0efaf4..706c56b9 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemRespDTO.java @@ -24,9 +24,6 @@ import java.util.Date; /** * Item resp dto. - * - * @author chen.ma - * @date 2021/6/29 21:15 */ @Data public class ItemRespDTO { @@ -37,38 +34,38 @@ public class ItemRespDTO { private Integer id; /** - * tenantId + * Tenant id */ private String tenantId; /** - * itemId + * Item id */ private String itemId; /** - * itemName + * Item name */ private String itemName; /** - * itemDesc + * Item desc */ private String itemDesc; /** - * owner + * Owner */ private String owner; /** - * gmtCreate + * Gmt create */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtCreate; /** - * gmtModified + * Gmt modified */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtModified; diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemSaveReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemSaveReqDTO.java index b4b9bd32..e7b92784 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemSaveReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemSaveReqDTO.java @@ -23,38 +23,34 @@ import javax.validation.constraints.Pattern; /** * Item save req dto. - * - * @author chen.ma - * @date 2021/6/29 22:05 */ @Data public class ItemSaveReqDTO { /** - * tenantId + * Tenant id */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String tenantId; /** - * itemId + * Item id */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String itemId; /** - * itemName + * Item name */ private String itemName; /** - * itemDesc + * Item desc */ private String itemDesc; /** - * owner + * Owner */ private String owner; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemUpdateReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemUpdateReqDTO.java index c961ddfc..1d85d6d6 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemUpdateReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/item/ItemUpdateReqDTO.java @@ -21,9 +21,6 @@ import lombok.Data; /** * Item update req dto. - * - * @author chen.ma - * @date 2021/6/29 22:05 */ @Data public class ItemUpdateReqDTO { @@ -37,5 +34,4 @@ public class ItemUpdateReqDTO { private String itemDesc; private String owner; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordQueryReqDTO.java index 4d90757e..757a840b 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordQueryReqDTO.java @@ -22,26 +22,22 @@ import lombok.Data; /** * 日志记录查询. - * - * @author chen.ma - * @date 2021/11/17 21:43 */ @Data public class LogRecordQueryReqDTO extends Page { /** - * 业务标识 + * Biz no */ private String bizNo; /** - * 业务类型 + * Category */ private String category; /** - * 操作人 + * Operator */ private String operator; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordRespDTO.java index 13473a4f..ac881619 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/log/LogRecordRespDTO.java @@ -23,36 +23,33 @@ import lombok.Data; import java.util.Date; /** - * 日志记录返回. - * - * @author chen.ma - * @date 2021/11/17 21:37 + * Log record resp DTO. */ @Data public class LogRecordRespDTO { /** - * 业务标识 + * Biz no */ private String bizNo; /** - * 日志内容 + * Action */ private String action; /** - * 操作人 + * Operator */ private String operator; /** - * 业务类型 + * Category */ private String category; /** - * gmtCreate + * Gmt create */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorActiveRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorActiveRespDTO.java index 794cb3bd..83c4b6b2 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorActiveRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorActiveRespDTO.java @@ -25,9 +25,6 @@ import java.util.List; /** * Monitor active resp dto. - * - * @author chen.ma - * @date 2021/12/12 17:18 */ @Data @NoArgsConstructor @@ -35,48 +32,47 @@ import java.util.List; public class MonitorActiveRespDTO { /** - * times + * Times */ private List times; /** - * poolSizeList + * Pool size list */ private List poolSizeList; /** - * activeSizeList + * Active size list */ private List activeSizeList; /** - * queueSizeList + * Queue size list */ private List queueSizeList; /** - * completedTaskCountList + * Completed task count list */ private List completedTaskCountList; /** - * rejectCountList + * Reject count list */ private List rejectCountList; /** - * queueRemainingCapacityList + * Queue remaining capacity list */ private List queueRemainingCapacityList; /** - * currentLoadList + * Current load list */ private List currentLoadList; /** - * queueCapacityList + * Queue capacity list */ private List queueCapacityList; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorQueryReqDTO.java index c0b65e4b..f5e4e119 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorQueryReqDTO.java @@ -20,32 +20,28 @@ package cn.hippo4j.config.model.biz.monitor; import lombok.Data; /** - * Monitor query req dto. - * - * @author chen.ma - * @date 2021/12/10 20:18 + * Monitor query req DTO. */ @Data public class MonitorQueryReqDTO { /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 线程池id + * Thread-pool id */ private String tpId; /** - * 实例id + * Instance id */ private String instanceId; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorRespDTO.java index 5575e387..3c2215ee 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/monitor/MonitorRespDTO.java @@ -20,77 +20,73 @@ package cn.hippo4j.config.model.biz.monitor; import lombok.Data; /** - * Monitor resp dto. - * - * @author chen.ma - * @date 2021/12/10 20:23 + * Monitor resp DTO. */ @Data public class MonitorRespDTO { /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 实例id + * Instance id */ private String instanceId; /** - * 已完成任务计数 + * Completed task count */ private String completedTaskCount; /** - * 线程池id + * Thread-pool id */ private String tpId; /** - * 当前负载 + * Current load */ private String currentLoad; /** - * 峰值负载 + * Peak load */ private String peakLoad; /** - * 线程数 + * Pool size */ private String poolSize; /** - * 活跃线程数 + * Active size */ private String activeSize; /** - * 队列容量 + * Queue capacity */ private String queueCapacity; /** - * 队列元素 + * Queue size */ private String queueSize; /** - * 队列剩余容量 + * Queue remaining capacity */ private String queueRemainingCapacity; /** - * 拒绝次数 + * Reject count */ private String rejectCount; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyListRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyListRespDTO.java index 314952ae..f22fff9d 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyListRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyListRespDTO.java @@ -25,22 +25,18 @@ import java.util.List; /** * Notify list resp dto. - * - * @author chen.ma - * @date 2021/11/17 22:53 */ @Data @AllArgsConstructor public class NotifyListRespDTO { /** - * 通知 Key + * Notify key */ private String notifyKey; /** - * 通知配置 + * Notify list */ private List notifyList; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyQueryReqDTO.java index e32e7b9a..259bd0bb 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyQueryReqDTO.java @@ -23,32 +23,28 @@ import lombok.Data; import java.util.List; /** - * Notify query req dto. - * - * @author chen.ma - * @date 2021/11/17 22:52 + * Notify query req DTO. */ @Data public class NotifyQueryReqDTO extends Page { /** - * groupKeys + * Group keys */ private List groupKeys; /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 线程池id + * Thread-pool id */ private String tpId; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyReqDTO.java index 5131ff9f..3c5a41b4 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyReqDTO.java @@ -20,7 +20,7 @@ package cn.hippo4j.config.model.biz.notify; import lombok.Data; /** - * 消息通知入参实体. + * Notify req DTO. * * @author chen.ma * @date 2021/11/18 20:15 @@ -29,63 +29,62 @@ import lombok.Data; public class NotifyReqDTO { /** - * id + * ID */ private String id; /** - * ids + * Ids */ private String ids; /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 线程池id + * Thread-pool id */ private String tpId; /** - * 通知平台 + * Platform */ private String platform; /** - * 配置变更通知类型 + * Config type */ private Boolean configType; /** - * 报警消息通知 + * Alarm type */ private Boolean alarmType; /** - * 密钥 + * Secret key */ private String secretKey; /** - * 报警间隔 + * Interval */ private Integer interval; /** - * 接收者 + * Receives */ private String receives; /** - * 是否启用 + * Enable */ private Integer enable; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyRespDTO.java index 63acf523..b10c7899 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/notify/NotifyRespDTO.java @@ -23,87 +23,84 @@ import lombok.Data; import java.util.Date; /** - * 消息通知返回. - * - * @author chen.ma - * @date 2021/11/18 20:07 + * Notify resp DTO. */ @Data public class NotifyRespDTO { /** - * id + * ID */ private String id; /** - * ids + * Ids */ private String ids; /** - * 租户id + * Tenant id */ private String tenantId; /** - * 项目id + * Item id */ private String itemId; /** - * 线程池id + * Thread-pool id */ private String tpId; /** - * 通知平台 + * Platform */ private String platform; /** - * 通知类型 + * Type */ private String type; /** - * 配置变更通知类型 + * Config type */ private Boolean configType; /** - * 报警消息通知 + * Alarm type */ private Boolean alarmType; /** - * 密钥 + * Secret key */ private String secretKey; /** - * 报警间隔 + * Interval */ private Integer interval; /** - * 接收者 + * Receives */ private String receives; /** - * 是否启用 + * Enable */ private Integer enable; /** - * 创建时间 + * gmtCreate */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtCreate; /** - * 修改时间 + * gmtModified */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtModified; diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantQueryReqDTO.java index bfe09832..aeb674f4 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantQueryReqDTO.java @@ -21,10 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.Data; /** - * Tenant query req dto. - * - * @author chen.ma - * @date 2021/6/29 22:28 + * Tenant query req DTO. */ @Data public class TenantQueryReqDTO extends Page { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantRespDTO.java index 57cccb9b..aec3e3be 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantRespDTO.java @@ -23,10 +23,7 @@ import lombok.Data; import java.util.Date; /** - * Tenant resp dto. - * - * @author chen.ma - * @date 2021/6/29 21:16 + * Tenant resp DTO. */ @Data public class TenantRespDTO { @@ -37,33 +34,33 @@ public class TenantRespDTO { private Integer id; /** - * tenantId + * Tenant id */ private String tenantId; /** - * tenantName + * Tenant name */ private String tenantName; /** - * tenantDesc + * Tenant desc */ private String tenantDesc; /** - * owner + * Owner */ private String owner; /** - * gmtCreate + * Gmt create */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtCreate; /** - * gmtModified + * Gmt modified */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtModified; diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantSaveReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantSaveReqDTO.java index cf3d8da9..d857746e 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantSaveReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantSaveReqDTO.java @@ -22,34 +22,30 @@ import lombok.Data; import javax.validation.constraints.Pattern; /** - * Tenant save req dto. - * - * @author chen.ma - * @date 2021/6/29 20:40 + * Tenant save req DTO. */ @Data public class TenantSaveReqDTO { /** - * tenantId + * Tenant id */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String tenantId; /** - * tenantName + * Tenant mame */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String tenantName; /** - * tenantDesc + * Tenant desc */ private String tenantDesc; /** - * owner + * Owner */ private String owner; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantUpdateReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantUpdateReqDTO.java index 7e79abee..48630991 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantUpdateReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/tenant/TenantUpdateReqDTO.java @@ -21,36 +21,33 @@ import cn.hippo4j.common.toolkit.JSONUtil; import lombok.Data; /** - * Tenant save req dto. - * - * @author chen.ma - * @date 2021/6/29 20:40 + * Tenant save req DTO. */ @Data public class TenantUpdateReqDTO { /** - * id + * ID */ private Long id; /** - * tenantId + * Tenant id */ private String tenantId; /** - * tenantName + * Tenant name */ private String tenantName; /** - * tenantDesc + * Tenant desc */ private String tenantDesc; /** - * owner + * Owner */ private String owner; @@ -58,5 +55,4 @@ public class TenantUpdateReqDTO { public String toString() { return JSONUtil.toJSONString(this); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolDelReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolDelReqDTO.java index 769b58db..3c638c9b 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolDelReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolDelReqDTO.java @@ -21,26 +21,22 @@ import lombok.Data; /** * ThreadPool del req dto. - * - * @author chen.ma - * @date 2021/11/11 21:40 */ @Data public class ThreadPoolDelReqDTO { /** - * tenantId + * Tenant id */ private String tenantId; /** - * itemId + * Item id */ private String itemId; /** - * tpId + * Thread-pool id */ private String tpId; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolQueryReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolQueryReqDTO.java index bade13e9..1864cfc4 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolQueryReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolQueryReqDTO.java @@ -22,9 +22,6 @@ import lombok.Data; /** * Thread pool query req DTO. - * - * @author chen.ma - * @date 2021/6/30 21:22 */ @Data public class ThreadPoolQueryReqDTO extends Page { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolRespDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolRespDTO.java index 4cfd5305..3c4fa030 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolRespDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolRespDTO.java @@ -23,97 +23,94 @@ import lombok.Data; import java.util.Date; /** - * Thread pool resp dto. - * - * @author chen.ma - * @date 2021/6/30 21:23 + * Thread pool resp DTO. */ @Data public class ThreadPoolRespDTO { /** - * id + * ID */ private String id; /** - * tenantId + * Tenant id */ private String tenantId; /** - * itemId + * Iem id */ private String itemId; /** - * tpId + * Thread-pool id */ private String tpId; /** - * coreSize + * Core size */ private Integer coreSize; /** - * maxSize + * Max size */ private Integer maxSize; /** - * queueType + * Queue type */ private Integer queueType; /** - * queueName + * Queue name */ private String queueName; /** - * capacity + * Capacity */ private Integer capacity; /** - * keepAliveTime + * Keep alive time */ private Integer keepAliveTime; /** - * isAlarm + * Is alarm */ private Integer isAlarm; /** - * capacityAlarm + * Capacity alarm */ private Integer capacityAlarm; /** - * livenessAlarm + * Liveness alarm */ private Integer livenessAlarm; /** - * rejectedType + * Rejected type */ private Integer rejectedType; /** - * allowCoreThreadTimeOut + * AllowCore thread timeout */ private Integer allowCoreThreadTimeOut; /** - * gmtCreate + * Gmt create */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtCreate; /** - * gmtModified + * Gmt modified */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date gmtModified; diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolSaveOrUpdateReqDTO.java b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolSaveOrUpdateReqDTO.java index a6705b49..fe25cdaf 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolSaveOrUpdateReqDTO.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/model/biz/threadpool/ThreadPoolSaveOrUpdateReqDTO.java @@ -22,80 +22,76 @@ import lombok.Data; import javax.validation.constraints.Pattern; /** - * Thread pool save or update req dto. - * - * @author chen.ma - * @date 2021/6/30 21:23 + * Thread pool save or update req DTO. */ @Data public class ThreadPoolSaveOrUpdateReqDTO { /** - * tenantId + * TenantId */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String tenantId; /** - * TpId + * Thread-pool id */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String tpId; /** - * ItemId + * Item id */ @Pattern(regexp = "^((?!\\+).)*$", message = "租户、项目、线程池 ID 包含+号") private String itemId; /** - * coreSize + * Core size */ private Integer coreSize; /** - * maxSize + * Max size */ private Integer maxSize; /** - * queueType + * Queue type */ private Integer queueType; /** - * capacity + * Capacity */ private Integer capacity; /** - * keepAliveTime + * Keep alive time */ private Integer keepAliveTime; /** - * isAlarm + * Is alarm */ private Integer isAlarm; /** - * capacityAlarm + * Capacity alarm */ private Integer capacityAlarm; /** - * livenessAlarm + * Liveness alarm */ private Integer livenessAlarm; /** - * rejectedType + * Rejected type */ private Integer rejectedType; /** - * allowCoreThreadTimeOut + * Allow core thread timeout */ private Integer allowCoreThreadTimeOut; - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/AbstractMonitorDataExecuteStrategy.java b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/AbstractMonitorDataExecuteStrategy.java index f838732c..ae0dc032 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/AbstractMonitorDataExecuteStrategy.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/AbstractMonitorDataExecuteStrategy.java @@ -21,9 +21,6 @@ import cn.hippo4j.common.monitor.Message; /** * Abstract monitor data execute strategy. - * - * @author chen.ma - * @date 2021/12/10 20:14 */ public abstract class AbstractMonitorDataExecuteStrategy { @@ -40,5 +37,4 @@ public abstract class AbstractMonitorDataExecuteStrategy { * @param message */ public abstract void execute(T message); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/DefaultMonitorDataResolver.java b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/DefaultMonitorDataResolver.java index 313916bf..97b909ac 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/DefaultMonitorDataResolver.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/DefaultMonitorDataResolver.java @@ -24,9 +24,6 @@ import org.springframework.stereotype.Component; /** * Default monitor data resolver. - * - * @author chen.ma - * @date 2021/12/10 21:47 */ @Slf4j @Component @@ -41,5 +38,4 @@ public class DefaultMonitorDataResolver extends AbstractMonitorDataExecuteStrate public void execute(Message message) { log.warn("There is no suitable monitoring data storage actuator."); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/QueryMonitorExecuteChoose.java b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/QueryMonitorExecuteChoose.java index f17511ff..5aedb340 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/QueryMonitorExecuteChoose.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/QueryMonitorExecuteChoose.java @@ -28,9 +28,6 @@ import java.util.Map; /** * Query monitor execute choose. - * - * @author chen.ma - * @date 2021/12/10 20:12 */ @Component public class QueryMonitorExecuteChoose implements CommandLineRunner { @@ -79,8 +76,6 @@ public class QueryMonitorExecuteChoose implements CommandLineRunner { public void run(String... args) throws Exception { Map monitorDataExecuteStrategyMap = ApplicationContextHolder.getBeansOfType(AbstractMonitorDataExecuteStrategy.class); - monitorDataExecuteStrategyMap.values().forEach(each -> monitorDataExecuteStrategyChooseMap.put(each.mark(), each)); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/RuntimeDataResolver.java b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/RuntimeDataResolver.java index 29afc0f9..eb089f56 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/RuntimeDataResolver.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/monitor/RuntimeDataResolver.java @@ -26,9 +26,6 @@ import org.springframework.stereotype.Component; /** * Runtime data resolver. - * - * @author chen.ma - * @date 2021/12/10 20:18 */ @Slf4j @Component @@ -46,5 +43,4 @@ public class RuntimeDataResolver extends AbstractMonitorDataExecuteStrategy queryWrapper = Wrappers.lambdaQuery(HisRunDataInfo.class) .le(HisRunDataInfo::getTimestamp, offsetMinuteDateTime.getTime()); - hisRunDataService.remove(queryWrapper); } @@ -73,5 +68,4 @@ public class TimeCleanHistoryDataTask implements Runnable, InitializingBean { cleanHistoryDataExecutor.scheduleWithFixedDelay(this, 0, 1, TimeUnit.MINUTES); } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/netty/MonitorNettyServer.java b/hippo4j-config/src/main/java/cn/hippo4j/config/netty/MonitorNettyServer.java index a229433f..8ad536ef 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/netty/MonitorNettyServer.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/netty/MonitorNettyServer.java @@ -18,14 +18,12 @@ package cn.hippo4j.config.netty; import cn.hippo4j.config.config.ServerBootstrapProperties; -import cn.hippo4j.config.monitor.QueryMonitorExecuteChoose; import cn.hippo4j.config.service.biz.HisRunDataService; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; -import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.serialization.ClassResolvers; @@ -35,18 +33,12 @@ import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; -import java.util.concurrent.ThreadPoolExecutor; /** - * Netty MonitorNettyServer - * - * @author lk - * @date 2022/06/18 + * Netty monitor netty server. */ @Slf4j @AllArgsConstructor @@ -68,8 +60,8 @@ public class MonitorNettyServer { serverBootstrap.group(bossGroup, workGroup) .channel(NioServerSocketChannel.class) .handler(new LoggingHandler(LogLevel.INFO)) - // BossGroup the Thread group is responsible for connection events - // WorkGroup the thread group is responsible for read and write events + // BossGroup the Thread group is responsible for connection events. + // WorkGroup the thread group is responsible for read and write events. .childHandler(new ChannelInitializer() { @Override diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/netty/ServerHandler.java b/hippo4j-config/src/main/java/cn/hippo4j/config/netty/ServerHandler.java index 3f21fe5e..a6a75a1e 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/netty/ServerHandler.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/netty/ServerHandler.java @@ -17,22 +17,15 @@ package cn.hippo4j.config.netty; -import cn.hippo4j.common.monitor.Message; import cn.hippo4j.common.monitor.MessageWrapper; -import cn.hippo4j.common.toolkit.MessageConvert; -import cn.hippo4j.config.monitor.QueryMonitorExecuteChoose; import cn.hippo4j.config.service.biz.HisRunDataService; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; /** - * ServerHandler - * - * @author lk - * @date 2022/06/18 + * Server handler. */ @Slf4j @AllArgsConstructor diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultPublisher.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultPublisher.java index 542616e0..1e74304e 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultPublisher.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultPublisher.java @@ -30,9 +30,6 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; /** * The default event publisher implementation. - * - * @author chen.ma - * @date 2021/6/23 19:06 */ @Slf4j public class DefaultPublisher extends Thread implements EventPublisher { @@ -81,7 +78,7 @@ public class DefaultPublisher extends Thread implements EventPublisher { private void openEventHandler() { try { int waitTimes = 60; - for (;;) { + for (; ; ) { if (shutdown || hasSubscriber() || waitTimes <= 0) { break; } @@ -92,8 +89,7 @@ public class DefaultPublisher extends Thread implements EventPublisher { } waitTimes--; } - - for (;;) { + for (; ; ) { if (shutdown) { break; } @@ -148,5 +144,4 @@ public class DefaultPublisher extends Thread implements EventPublisher { notifySubscriber(subscriber, event); } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultSharePublisher.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultSharePublisher.java index e5ad4fe8..b877bfbb 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultSharePublisher.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/DefaultSharePublisher.java @@ -30,9 +30,6 @@ import java.util.concurrent.locks.ReentrantLock; /** * Default share publisher. - * - * @author chen.ma - * @date 2021/6/23 19:05 */ public class DefaultSharePublisher extends DefaultPublisher { @@ -45,7 +42,6 @@ public class DefaultSharePublisher extends DefaultPublisher { public void addSubscriber(AbstractSubscriber subscriber, Class subscribeType) { Class subSlowEventType = (Class) subscribeType; subscribers.add(subscriber); - lock.lock(); try { Set sets = subMappings.get(subSlowEventType); @@ -60,5 +56,4 @@ public class DefaultSharePublisher extends DefaultPublisher { lock.unlock(); } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/EventPublisher.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/EventPublisher.java index 02e1afa2..858b30f2 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/EventPublisher.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/EventPublisher.java @@ -22,9 +22,6 @@ import cn.hippo4j.config.notify.listener.AbstractSubscriber; /** * Event publisher. - * - * @author chen.ma - * @date 2021/6/23 18:58 */ public interface EventPublisher { @@ -58,5 +55,4 @@ public interface EventPublisher { * @param event */ void notifySubscriber(AbstractSubscriber subscriber, AbstractEvent event); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/NotifyCenter.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/NotifyCenter.java index d4aed4ba..6c460526 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/NotifyCenter.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/NotifyCenter.java @@ -31,9 +31,6 @@ import java.util.function.BiFunction; /** * Unified event notify center. - * - * @author chen.ma - * @date 2021/6/23 18:58 */ @Slf4j public class NotifyCenter { @@ -65,7 +62,6 @@ public class NotifyCenter { throw new RuntimeException(ex); } }; - INSTANCE.sharePublisher = new DefaultSharePublisher(); INSTANCE.sharePublisher.init(AbstractSlowEvent.class, shareBufferSize); } @@ -81,13 +77,11 @@ public class NotifyCenter { } return; } - final Class subscribeType = consumer.subscribeType(); if (ClassUtil.isAssignableFrom(AbstractSlowEvent.class, subscribeType)) { INSTANCE.sharePublisher.addSubscriber(consumer, subscribeType); return; } - addSubscriber(consumer, subscribeType); } @@ -113,9 +107,7 @@ public class NotifyCenter { if (ClassUtil.isAssignableFrom(AbstractSlowEvent.class, eventType)) { return INSTANCE.sharePublisher.publish(event); } - final String topic = ClassUtil.getCanonicalName(eventType); - EventPublisher publisher = INSTANCE.publisherMap.get(topic); if (publisher != null) { return publisher.publish(event); @@ -128,12 +120,10 @@ public class NotifyCenter { if (ClassUtil.isAssignableFrom(AbstractSlowEvent.class, eventType)) { return INSTANCE.sharePublisher; } - final String topic = ClassUtil.getCanonicalName(eventType); synchronized (NotifyCenter.class) { MapUtil.computeIfAbsent(INSTANCE.publisherMap, topic, publisherFactory, eventType, queueMaxSize); } return INSTANCE.publisherMap.get(topic); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSmartSubscriber.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSmartSubscriber.java index be5e7476..38d74efb 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSmartSubscriber.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSmartSubscriber.java @@ -23,9 +23,6 @@ import java.util.List; /** * Subscribers to multiple events can be listened to. - * - * @author chen.ma - * @date 2021/6/23 19:02 */ public abstract class AbstractSmartSubscriber extends AbstractSubscriber { @@ -35,5 +32,4 @@ public abstract class AbstractSmartSubscriber extends AbstractSubscriber { * @return */ public abstract List> subscribeTypes(); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSubscriber.java b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSubscriber.java index afeca271..16357b47 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSubscriber.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/notify/listener/AbstractSubscriber.java @@ -23,9 +23,6 @@ import java.util.concurrent.Executor; /** * An abstract subscriber class for subscriber interface. - * - * @author chen.ma - * @date 2021/6/23 19:02 */ public abstract class AbstractSubscriber { @@ -46,5 +43,4 @@ public abstract class AbstractSubscriber { public Executor executor() { return null; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/LongPollingService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/LongPollingService.java index e9fa3e5b..671de168 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/LongPollingService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/LongPollingService.java @@ -131,7 +131,7 @@ public class LongPollingService { }); } } catch (Exception ex) { - log.error("Data change error :: {}", ex.getMessage(), ex); + log.error("Data change error: {}", ex.getMessage(), ex); } } } @@ -217,7 +217,7 @@ public class LongPollingService { sendResponse(null); } } catch (Exception ex) { - log.error("Long polling error :: {}", ex.getMessage(), ex); + log.error("Long polling error: {}", ex.getMessage(), ex); } }, timeoutTime, TimeUnit.MILLISECONDS); allSubs.add(this); diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/ThreadPoolAdapterService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/ThreadPoolAdapterService.java index 86ecfe43..4cc8beb8 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/ThreadPoolAdapterService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/ThreadPoolAdapterService.java @@ -147,7 +147,7 @@ public class ThreadPoolAdapterService { @Override public void accept(ObserverMessage observerMessage) { - log.info("Clean up the thread-pool adapter cache. Key :: {}", observerMessage.message()); + log.info("Clean up the thread-pool adapter cache. Key: {}", observerMessage.message()); remove(observerMessage.message()); } } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ConfigService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ConfigService.java index 267df744..a12b1225 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ConfigService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ConfigService.java @@ -21,9 +21,6 @@ import cn.hippo4j.config.model.ConfigAllInfo; /** * Config service. - * - * @author chen.ma - * @date 2021/6/20 15:18 */ public interface ConfigService { diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/HisRunDataService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/HisRunDataService.java index 59c35840..2c3a8294 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/HisRunDataService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/HisRunDataService.java @@ -25,15 +25,11 @@ import cn.hippo4j.config.model.biz.monitor.MonitorActiveRespDTO; import cn.hippo4j.config.model.biz.monitor.MonitorQueryReqDTO; import cn.hippo4j.config.model.biz.monitor.MonitorRespDTO; import com.baomidou.mybatisplus.extension.service.IService; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; /** * His run data service. - * - * @author chen.ma - * @date 2021/12/10 21:28 */ public interface HisRunDataService extends IService { @@ -74,5 +70,4 @@ public interface HisRunDataService extends IService { * @param messageWrapper */ Result dataCollect(MessageWrapper messageWrapper); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ItemService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ItemService.java index c11ce694..13827314 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ItemService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ItemService.java @@ -27,9 +27,6 @@ import java.util.List; /** * Item service. - * - * @author chen.ma - * @date 2021/6/29 21:57 */ public interface ItemService { @@ -79,5 +76,4 @@ public interface ItemService { * @param itemId */ void deleteItem(String tenantId, String itemId); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/NotifyService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/NotifyService.java index 08d6e1e4..bfc764be 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/NotifyService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/NotifyService.java @@ -26,15 +26,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import java.util.List; /** - * 通知管理. - * - * @author chen.ma - * @date 2021/11/17 22:01 + * Notify service. */ public interface NotifyService { /** - * 查询通知配置集合. + * List notify config. * * @param reqDTO * @return @@ -42,7 +39,7 @@ public interface NotifyService { List listNotifyConfig(NotifyQueryReqDTO reqDTO); /** - * 分页查询. + * Query page. * * @param reqDTO * @return @@ -50,32 +47,31 @@ public interface NotifyService { IPage queryPage(NotifyQueryReqDTO reqDTO); /** - * 新增通知配置. + * Save. * * @param reqDTO */ void save(NotifyReqDTO reqDTO); /** - * 修改通知配置. + * Update. * * @param reqDTO */ void update(NotifyReqDTO reqDTO); /** - * 删除通知配置. + * Delete. * * @param reqDTO */ void delete(NotifyReqDTO reqDTO); /** - * 启用停用通知. + * Enable notify. * * @param id * @param status */ void enableNotify(String id, Integer status); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/TenantService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/TenantService.java index d115675f..d0ac22f8 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/TenantService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/TenantService.java @@ -25,9 +25,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; /** * Tenant service. - * - * @author chen.ma - * @date 2021/6/29 21:59 */ public interface TenantService { @@ -75,5 +72,4 @@ public interface TenantService { * @param tenantId */ void deleteTenantById(String tenantId); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ThreadPoolService.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ThreadPoolService.java index 644410a5..f0ea6bd3 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ThreadPoolService.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/ThreadPoolService.java @@ -27,9 +27,6 @@ import java.util.List; /** * Thread pool service. - * - * @author chen.ma - * @date 2021/6/30 21:26 */ public interface ThreadPoolService { @@ -79,5 +76,4 @@ public interface ThreadPoolService { * @param isAlarm */ void alarmEnable(String id, Integer isAlarm); - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/HisRunDataServiceImpl.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/HisRunDataServiceImpl.java index 0e0b4a6b..0466070a 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/HisRunDataServiceImpl.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/HisRunDataServiceImpl.java @@ -50,9 +50,6 @@ import static cn.hutool.core.date.DatePattern.NORM_TIME_PATTERN; /** * His run data service impl. - * - * @author chen.ma - * @date 2021/12/10 21:28 */ @Service @AllArgsConstructor @@ -69,7 +66,6 @@ public class HisRunDataServiceImpl extends ServiceImpl hisRunDataInfos = this.lambdaQuery() .eq(HisRunDataInfo::getTenantId, reqDTO.getTenantId()) .eq(HisRunDataInfo::getItemId, reqDTO.getItemId()) @@ -78,7 +74,6 @@ public class HisRunDataServiceImpl extends ServiceImpl hisRunDataInfos = this.lambdaQuery() .eq(HisRunDataInfo::getTenantId, reqDTO.getTenantId()) .eq(HisRunDataInfo::getItemId, reqDTO.getItemId()) @@ -96,7 +90,6 @@ public class HisRunDataServiceImpl extends ServiceImpl times = Lists.newArrayList(); List poolSizeList = Lists.newArrayList(); List activeSizeList = Lists.newArrayList(); @@ -106,7 +99,6 @@ public class HisRunDataServiceImpl extends ServiceImpl rejectCountList = Lists.newArrayList(); List queueRemainingCapacityList = Lists.newArrayList(); List currentLoadList = Lists.newArrayList(); - long countTemp = 0L; AtomicBoolean firstFlag = new AtomicBoolean(Boolean.TRUE); for (HisRunDataInfo each : hisRunDataInfos) { @@ -119,20 +111,17 @@ public class HisRunDataServiceImpl extends ServiceImpl runtimeMessages = message.getMessages(); List hisRunDataInfos = Lists.newArrayList(); - runtimeMessages.forEach(each -> { HisRunDataInfo hisRunDataInfo = BeanUtil.convert(each, HisRunDataInfo.class); String[] parseKey = GroupKey.parseKey(each.getGroupKey()); - hisRunDataInfo.setTpId(parseKey[0]); hisRunDataInfo.setItemId(parseKey[1]); hisRunDataInfo.setTenantId(parseKey[2]); hisRunDataInfo.setInstanceId(parseKey[3]); - hisRunDataInfos.add(hisRunDataInfo); }); - this.saveBatch(hisRunDataInfos); } @@ -189,5 +172,4 @@ public class HisRunDataServiceImpl extends ServiceImpl wrapper = Wrappers.lambdaQuery(ItemInfo.class) .eq(!StringUtils.isEmpty(reqDTO.getItemId()), ItemInfo::getItemId, reqDTO.getItemId()) .eq(!StringUtils.isEmpty(reqDTO.getTenantId()), ItemInfo::getTenantId, reqDTO.getTenantId()); - List itemInfos = itemInfoMapper.selectList(wrapper); return BeanUtil.convert(itemInfos, ItemRespDTO.class); } @@ -93,15 +88,12 @@ public class ItemServiceImpl implements ItemService { public void saveItem(ItemSaveReqDTO reqDTO) { LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(ItemInfo.class) .eq(ItemInfo::getItemId, reqDTO.getItemId()); - - // 当前为单体应用, 后续支持集群部署时切换分布式锁. + // It is currently a single application, and it will support switching distributed locks during cluster deployment in the future. synchronized (ItemService.class) { ItemInfo existItemInfo = itemInfoMapper.selectOne(queryWrapper); Assert.isNull(existItemInfo, "项目配置已存在."); - ItemInfo itemInfo = BeanUtil.convert(reqDTO, ItemInfo.class); int insertResult = itemInfoMapper.insert(itemInfo); - boolean retBool = SqlHelper.retBool(insertResult); if (!retBool) { throw new RuntimeException("Save error"); @@ -116,7 +108,6 @@ public class ItemServiceImpl implements ItemService { Wrappers.lambdaUpdate(ItemInfo.class) .eq(ItemInfo::getTenantId, reqDTO.getTenantId()) .eq(ItemInfo::getItemId, reqDTO.getItemId())); - boolean retBool = SqlHelper.retBool(updateResult); if (!retBool) { throw new RuntimeException("Update error."); @@ -129,17 +120,14 @@ public class ItemServiceImpl implements ItemService { if (CollectionUtils.isNotEmpty(itemList)) { throw new RuntimeException("项目包含线程池引用, 删除失败."); } - int updateResult = itemInfoMapper.update(new ItemInfo(), Wrappers.lambdaUpdate(ItemInfo.class) .eq(ItemInfo::getTenantId, namespace) .eq(ItemInfo::getItemId, itemId) .set(ItemInfo::getDelFlag, DelEnum.DELETE.getIntCode())); - boolean retBool = SqlHelper.retBool(updateResult); if (!retBool) { throw new RuntimeException("Delete error."); } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/NotifyServiceImpl.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/NotifyServiceImpl.java index d65f3c5f..b555e13b 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/NotifyServiceImpl.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/NotifyServiceImpl.java @@ -44,10 +44,7 @@ import java.util.List; import java.util.Objects; /** - * 通知管理. - * - * @author chen.ma - * @date 2021/11/17 22:02 + * Notify service impl. */ @Service @AllArgsConstructor diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/OperationLogServiceImpl.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/OperationLogServiceImpl.java index dd0ed0f0..10276d72 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/OperationLogServiceImpl.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/OperationLogServiceImpl.java @@ -32,9 +32,6 @@ import org.springframework.stereotype.Service; /** * Operation log service impl. - * - * @author chen.ma - * @date 2021/11/17 21:50 */ @Service @AllArgsConstructor diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/TenantServiceImpl.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/TenantServiceImpl.java index 85950f2f..f3a0baa6 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/TenantServiceImpl.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/biz/impl/TenantServiceImpl.java @@ -44,9 +44,6 @@ import java.util.List; /** * Tenant service impl. - * - * @author chen.ma - * @date 2021/6/29 21:12 */ @Service @AllArgsConstructor @@ -89,10 +86,8 @@ public class TenantServiceImpl implements TenantService { synchronized (TenantService.class) { TenantInfo existTenantInfo = tenantInfoMapper.selectOne(queryWrapper); Assert.isNull(existTenantInfo, "租户配置已存在."); - TenantInfo tenantInfo = BeanUtil.convert(reqDTO, TenantInfo.class); int insertResult = tenantInfoMapper.insert(tenantInfo); - boolean retBool = SqlHelper.retBool(insertResult); if (!retBool) { throw new RuntimeException("Save Error."); diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/service/handler/ClientCloseHookRemoveConfigCache.java b/hippo4j-config/src/main/java/cn/hippo4j/config/service/handler/ClientCloseHookRemoveConfigCache.java index 3c8dda3a..293ab32d 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/service/handler/ClientCloseHookRemoveConfigCache.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/service/handler/ClientCloseHookRemoveConfigCache.java @@ -26,22 +26,16 @@ import org.springframework.stereotype.Component; /** * Client close hook remove config cache. - * - * @author chen.ma - * @date 2022/1/6 22:20 */ @Slf4j @Component public class ClientCloseHookRemoveConfigCache implements ClientCloseHookExecute { @Override - public void closeHook(ClientCloseHookReq req) { - log.info( - "Remove Config Cache, Execute client hook function. Req :: {}", - JSONUtil.toJSONString(req)); - + public void closeHook(ClientCloseHookReq requestParam) { + log.info("Remove Config Cache, Execute client hook function. Request :: {}", JSONUtil.toJSONString(requestParam)); try { - String groupKey = req.getGroupKey(); + String groupKey = requestParam.getGroupKey(); if (StrUtil.isNotBlank(groupKey)) { ConfigCacheService.removeConfigCache(groupKey); } @@ -49,5 +43,4 @@ public class ClientCloseHookRemoveConfigCache implements ClientCloseHookExecute log.error("Failed to remove config cache hook.", ex); } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/BeanUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/BeanUtil.java index 467171fe..ad4c3879 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/BeanUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/BeanUtil.java @@ -23,10 +23,7 @@ import com.github.dozermapper.core.Mapper; import java.util.*; /** - * Bean util - * - * @author chen.ma - * @date 2021/3/19 15:40 + * Bean util. */ public class BeanUtil { @@ -67,5 +64,4 @@ public class BeanUtil { }) .orElse(null); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ClassUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ClassUtil.java index 740d1893..24e4bd27 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ClassUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ClassUtil.java @@ -21,9 +21,6 @@ import java.util.Objects; /** * Class util. - * - * @author chen.ma - * @date 2021/6/23 19:03 */ public class ClassUtil { @@ -36,5 +33,4 @@ public class ClassUtil { Objects.requireNonNull(cls, "cls"); return cls.getCanonicalName(); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ConfigExecutor.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ConfigExecutor.java index 223566f5..00a58039 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ConfigExecutor.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/ConfigExecutor.java @@ -27,9 +27,6 @@ import static cn.hippo4j.common.constant.Constants.DEFAULT_GROUP; /** * Config executor. - * - * @author chen.ma - * @date 2021/6/23 18:33 */ public class ConfigExecutor { @@ -47,5 +44,4 @@ public class ConfigExecutor { public static void scheduleLongPolling(Runnable runnable, long initialDelay, long period, TimeUnit unit) { LONG_POLLING_EXECUTOR.scheduleWithFixedDelay(runnable, initialDelay, period, unit); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/EnvUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/EnvUtil.java index 9a471d86..2e78d7dd 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/EnvUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/EnvUtil.java @@ -24,9 +24,6 @@ import java.util.Objects; /** * Env Util. - * - * @author chen.ma - * @date 2022/2/9 07:46 */ public class EnvUtil { @@ -49,10 +46,8 @@ public class EnvUtil { if (StringUtils.isBlank(hippo4jHome)) { hippo4jHome = Paths.get(System.getProperty("user.home"), "hippo4j").toString(); } - return hippo4jHome; } - return HIPPO4J_HOME_PATH; } @@ -65,8 +60,6 @@ public class EnvUtil { if (Objects.isNull(IS_STANDALONE)) { IS_STANDALONE = Boolean.getBoolean(STANDALONE_MODE_PROPERTY_NAME); } - return IS_STANDALONE; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/MapUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/MapUtil.java index a3993a00..0df8bdac 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/MapUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/MapUtil.java @@ -27,9 +27,6 @@ import java.util.function.BiFunction; /** * Map util. - * - * @author chen.ma - * @date 2021/6/23 19:09 */ public class MapUtil { @@ -39,7 +36,6 @@ public class MapUtil { Objects.requireNonNull(mappingFunction, "mappingFunction"); Objects.requireNonNull(param1, "param1"); Objects.requireNonNull(param2, "param2"); - Object val = target.get(key); if (val == null) { Object ret = mappingFunction.apply(param1, param2); @@ -50,7 +46,7 @@ public class MapUtil { } /** - * 根据 Key 进行模糊匹配. + * Fuzzy matching based on Key. * * @param sourceMap * @param filters @@ -61,18 +57,16 @@ public class MapUtil { if (CollUtil.isEmpty(sourceMap)) { return resultList; } - sourceMap.forEach((key, val) -> { if (checkKey(key, filters)) { resultList.add(key); } }); - return resultList; } /** - * 匹配想要查询的字符. + * Match the characters you want to query. * * @param key * @param filters @@ -85,5 +79,4 @@ public class MapUtil { return false; } } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/Md5ConfigUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/Md5ConfigUtil.java index f2227c75..bb0ae38a 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/Md5ConfigUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/Md5ConfigUtil.java @@ -36,9 +36,6 @@ import static cn.hippo4j.common.constant.Constants.WORD_SEPARATOR; /** * Md5 config util. - * - * @author chen.ma - * @date 2021/6/21 18:32 */ public class Md5ConfigUtil { @@ -72,13 +69,11 @@ public class Md5ConfigUtil { changedGroupKeys.add(key); } }); - return changedGroupKeys; } public static Map getClientMd5Map(String configKeysString) { Map md5Map = new HashMap(5); - if (null == configKeysString || "".equals(configKeysString)) { return md5Map; } @@ -99,12 +94,10 @@ public class Md5ConfigUtil { endValue = configKeysString.substring(start, i); } start = i + 1; - String groupKey = getKey(tmpList.get(0), tmpList.get(1), tmpList.get(2), tmpList.get(3)); groupKey = SingletonRepository.DataIdGroupIdCache.getSingleton(groupKey); md5Map.put(groupKey, endValue); tmpList.clear(); - // Protect malformed messages if (md5Map.size() > 10000) { throw new IllegalArgumentException("invalid protocol, too much listener"); @@ -132,7 +125,6 @@ public class Md5ConfigUtil { GroupKey.urlEncode(tenant, sb); sb.append("+").append(identify); } - return sb.toString(); } @@ -140,9 +132,7 @@ public class Md5ConfigUtil { if (null == changedGroupKeys) { return ""; } - StringBuilder sb = new StringBuilder(); - for (String groupKey : changedGroupKeys) { String[] dataIdGroupId = GroupKey.parseKey(groupKey); sb.append(dataIdGroupId[0]); @@ -157,8 +147,6 @@ public class Md5ConfigUtil { } sb.append(LINE_SEPARATOR); } - return URLEncoder.encode(sb.toString(), "UTF-8"); } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/RequestUtil.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/RequestUtil.java index f829fc12..85d369cf 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/RequestUtil.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/RequestUtil.java @@ -25,9 +25,6 @@ import static cn.hippo4j.common.constant.Constants.LONG_PULLING_CLIENT_IDENTIFIC /** * Request util. - * - * @author chen.ma - * @date 2021/6/23 18:28 */ public class RequestUtil { @@ -41,5 +38,4 @@ public class RequestUtil { String identify = request.getHeader(LONG_PULLING_CLIENT_IDENTIFICATION); return StrUtil.isBlank(identify) ? "" : identify; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SimpleReadWriteLock.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SimpleReadWriteLock.java index bd990288..45cd23ef 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SimpleReadWriteLock.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SimpleReadWriteLock.java @@ -19,9 +19,6 @@ package cn.hippo4j.config.toolkit; /** * Simple read write lock. - * - * @author chen.ma - * @date 2021/6/24 21:26 */ public class SimpleReadWriteLock { @@ -60,5 +57,4 @@ public class SimpleReadWriteLock { private boolean isFree() { return status == 0; } - } diff --git a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SingletonRepository.java b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SingletonRepository.java index 8e2ed565..12885bd0 100644 --- a/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SingletonRepository.java +++ b/hippo4j-config/src/main/java/cn/hippo4j/config/toolkit/SingletonRepository.java @@ -21,9 +21,6 @@ import java.util.concurrent.ConcurrentHashMap; /** * Singleton repository. - * - * @author chen.ma - * @date 2021/6/24 21:28 */ public class SingletonRepository { @@ -54,5 +51,4 @@ public class SingletonRepository { static SingletonRepository cache = new SingletonRepository(); } - }