提交 fdce41b4 编写于 作者: X xuguang

增加对定时任务的说明

上级 373680d8
......@@ -156,6 +156,9 @@ public class LogicalClusterMetadataManager {
return logicalClusterDO.getClusterId();
}
/**
* 定时刷新逻辑集群元数据到缓存中
*/
@Scheduled(cron="0/30 * * * * ?")
public void flush() {
List<LogicalClusterDO> logicalClusterDOList = logicalClusterService.listAll();
......
......@@ -275,6 +275,9 @@ public class AccountServiceImpl implements AccountService {
return enterpriseStaffService.searchEnterpriseStaffByKeyWord(prefix);
}
/**
* 定时刷新account信息到缓存中
*/
@Scheduled(cron ="0/5 * * * * ?")
public void flush() {
try {
......
......@@ -23,6 +23,9 @@ public class Heartbeat {
@Autowired
private HeartbeatDao heartbeatDao;
/**
* 定时获取管控平台所在机器IP等信息到DB
*/
@Scheduled(cron = ScheduledTaskConstant.HEARTBEAT_CRON)
public void ipFlush() {
try {
......
......@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.List;
/**
* 同步更新集群任务状态
* @author zengqiao
* @date 20/9/7
*/
......
......@@ -28,6 +28,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
/**
* 收集并发布消费者指标数据
* @author zengqiao
* @date 20/9/14
*/
......
......@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
/**
* 收集和发布Topic限流信息
* @author zengqiao
* @date 2019-05-10
*/
......
......@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.util.*;
/**
* JMX中获取appId维度的流量信息存DB
* @author zengqiao
* @date 20/7/21
*/
......
......@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.util.*;
/**
* JMX中获取的TopicRequestTimeMetrics信息存DB
* @author zengqiao
* @date 20/7/21
*/
......
......@@ -31,6 +31,7 @@ import java.util.List;
import java.util.Properties;
/**
* 定时自动处理Topic相关工单
* @author zengqiao
* @date 20/7/28
*/
......
......@@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.List;
/**
* 定时上报Topic监控指标
* @author zengqiao
* @date 20/8/10
*/
......
......@@ -30,6 +30,9 @@ public class FlushTopicMetrics {
@Autowired
private ClusterService clusterService;
/**
* 定时刷新topic指标到缓存中
*/
@Scheduled(cron="5 0/1 * * * ?")
public void flushTopicMetrics() {
long startTime = System.currentTimeMillis();
......
......@@ -30,6 +30,9 @@ public class FlushBKConsumerGroupMetadata {
@Autowired
private ClusterService clusterService;
/**
* 定时刷新broker上消费组信息到缓存中
*/
@Scheduled(cron="15 0/1 * * * ?")
public void schedule() {
List<ClusterDO> doList = clusterService.list();
......
......@@ -25,6 +25,9 @@ public class FlushClusterMetadata {
@Autowired
private PhysicalClusterMetadataManager physicalClusterMetadataManager;
/**
* 定时刷新物理集群元信息到缓存中
*/
@Scheduled(cron="0/30 * * * * ?")
public void flush() {
Map<Long, ClusterDO> dbClusterMap = clusterService.list().stream().collect(Collectors.toMap(ClusterDO::getId, Function.identity(), (key1, key2) -> key2));
......
......@@ -27,6 +27,9 @@ public class FlushTopicProperties {
@Autowired
private ClusterService clusterService;
/**
* 定时刷新物理集群配置到缓存中
*/
@Scheduled(cron="25 0/1 * * * ?")
public void flush() {
List<ClusterDO> doList = clusterService.list();
......
......@@ -35,6 +35,9 @@ public class FlushZKConsumerGroupMetadata {
@Autowired
private ThreadPool threadPool;
/**
* 定时刷新zk上的消费组信息到缓存中
*/
@Scheduled(cron="35 0/1 * * * ?")
public void schedule() {
List<ClusterDO> doList = clusterService.list();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册