ref[scheduler]: refactor scheduler

This commit is contained in:
godotg
2023-09-02 22:39:22 +08:00
parent 9a35193a9a
commit 87725fa484
13 changed files with 20 additions and 28 deletions
@@ -24,9 +24,9 @@ import com.zfoo.net.task.TaskBus;
import com.zfoo.protocol.exception.ExceptionUtils;
import com.zfoo.protocol.util.IOUtils;
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.scheduler.SchedulerContext;
import com.zfoo.scheduler.model.StopWatch;
import com.zfoo.protocol.util.ThreadUtils;
import com.zfoo.scheduler.SchedulerContext;
import com.zfoo.scheduler.util.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
@@ -14,15 +14,15 @@
package com.zfoo.orm;
import com.mongodb.client.MongoClient;
import com.zfoo.orm.accessor.IAccessor;
import com.zfoo.orm.manager.IOrmManager;
import com.zfoo.orm.manager.OrmManager;
import com.zfoo.orm.accessor.IAccessor;
import com.zfoo.orm.model.entity.IEntity;
import com.zfoo.orm.query.IQuery;
import com.zfoo.orm.query.IQueryBuilder;
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.scheduler.SchedulerContext;
import com.zfoo.scheduler.model.StopWatch;
import com.zfoo.scheduler.util.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
@@ -16,10 +16,10 @@ package com.zfoo.scheduler;
import com.zfoo.protocol.collection.ArrayUtils;
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.protocol.util.StringUtils;
import com.zfoo.scheduler.manager.SchedulerBus;
import com.zfoo.scheduler.model.anno.Scheduler;
import com.zfoo.scheduler.model.vo.SchedulerDefinition;
import com.zfoo.protocol.util.ThreadUtils;
import com.zfoo.scheduler.anno.Scheduler;
import com.zfoo.scheduler.enhance.SchedulerDefinition;
import com.zfoo.scheduler.manager.SchedulerBus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.anno;
package com.zfoo.scheduler.anno;
import org.springframework.aot.hint.annotation.Reflective;
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.vo;
package com.zfoo.scheduler.enhance;
import com.zfoo.protocol.util.StringUtils;
import com.zfoo.protocol.util.UuidUtils;
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.vo;
package com.zfoo.scheduler.enhance;
/**
* @author godotg
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.vo;
package com.zfoo.scheduler.enhance;
import com.zfoo.protocol.util.ReflectionUtils;
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.vo;
package com.zfoo.scheduler.enhance;
/**
* @author godotg
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 The zfoo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
@@ -11,11 +10,11 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model.vo;
package com.zfoo.scheduler.enhance;
import com.zfoo.protocol.util.GraalVmUtils;
import com.zfoo.protocol.util.ReflectionUtils;
import com.zfoo.scheduler.util.TimeUtils;
import com.zfoo.protocol.util.GraalVmUtils;
import javassist.CannotCompileException;
import javassist.NotFoundException;
import org.springframework.scheduling.support.CronExpression;
@@ -15,10 +15,10 @@ package com.zfoo.scheduler.manager;
import com.zfoo.protocol.collection.CollectionUtils;
import com.zfoo.protocol.util.StringUtils;
import com.zfoo.scheduler.SchedulerContext;
import com.zfoo.scheduler.model.vo.SchedulerDefinition;
import com.zfoo.scheduler.util.TimeUtils;
import com.zfoo.protocol.util.ThreadUtils;
import com.zfoo.scheduler.SchedulerContext;
import com.zfoo.scheduler.enhance.SchedulerDefinition;
import com.zfoo.scheduler.util.TimeUtils;
import io.netty.util.concurrent.FastThreadLocalThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -10,9 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.zfoo.scheduler.model;
import com.zfoo.scheduler.util.TimeUtils;
package com.zfoo.scheduler.util;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -13,7 +13,7 @@
package com.zfoo.scheduler;
import com.zfoo.scheduler.model.anno.Scheduler;
import com.zfoo.scheduler.anno.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -13,7 +13,7 @@
package com.zfoo.storage;
import com.zfoo.scheduler.model.StopWatch;
import com.zfoo.scheduler.util.StopWatch;
import com.zfoo.storage.manager.IStorageManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;