From 961c60dd1a546969359b717c289f7cf21d083670 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 10 五月 2021 23:53:15 +0800 Subject: [PATCH] update 更新banner --- ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java | 110 +++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 55 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java index 6ed6d5b..7387a02 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java @@ -1,55 +1,55 @@ -package com.ruoyi.framework.manager; - -import java.util.TimerTask; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import com.ruoyi.common.utils.Threads; -import com.ruoyi.common.utils.spring.SpringUtils; - -/** - * 寮傛浠诲姟绠$悊鍣� - * - * @author ruoyi - */ -public class AsyncManager -{ - /** - * 鎿嶄綔寤惰繜10姣 - */ - private final int OPERATE_DELAY_TIME = 10; - - /** - * 寮傛鎿嶄綔浠诲姟璋冨害绾跨▼姹� - */ - private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); - - /** - * 鍗曚緥妯″紡 - */ - private AsyncManager(){} - - private static AsyncManager me = new AsyncManager(); - - public static AsyncManager me() - { - return me; - } - - /** - * 鎵ц浠诲姟 - * - * @param task 浠诲姟 - */ - public void execute(TimerTask task) - { - executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); - } - - /** - * 鍋滄浠诲姟绾跨▼姹� - */ - public void shutdown() - { - Threads.shutdownAndAwaitTermination(executor); - } -} +package com.ruoyi.framework.manager; + +import java.util.TimerTask; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import com.ruoyi.common.utils.Threads; +import com.ruoyi.common.utils.spring.SpringUtils; + +/** + * 寮傛浠诲姟绠$悊鍣� + * + * @author ruoyi + */ +public class AsyncManager +{ + /** + * 鎿嶄綔寤惰繜10姣 + */ + private final int OPERATE_DELAY_TIME = 10; + + /** + * 寮傛鎿嶄綔浠诲姟璋冨害绾跨▼姹� + */ + private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); + + /** + * 鍗曚緥妯″紡 + */ + private AsyncManager(){} + + private static AsyncManager me = new AsyncManager(); + + public static AsyncManager me() + { + return me; + } + + /** + * 鎵ц浠诲姟 + * + * @param task 浠诲姟 + */ + public void execute(TimerTask task) + { + executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); + } + + /** + * 鍋滄浠诲姟绾跨▼姹� + */ + public void shutdown() + { + Threads.shutdownAndAwaitTermination(executor); + } +} -- Gitblit v1.9.3