Package org.aoju.bus.socket
Class QuickTimer
java.lang.Object
org.aoju.bus.socket.QuickTimer
- All Implemented Interfaces:
Runnable
服务器定时任务
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprotected longgetDelay()获取定时任务的延迟启动时间protected abstract long获取定时任务的执行频率static ScheduledFuture<?>scheduleAtFixedRate(Runnable command, long initialDelay, long period)
-
Field Details
-
SCHEDULED_EXECUTOR_SERVICE
-
-
Constructor Details
-
QuickTimer
public QuickTimer()
-
-
Method Details
-
cancelQuickTask
public static void cancelQuickTask() -
scheduleAtFixedRate
public static ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period) -
getDelay
protected long getDelay()获取定时任务的延迟启动时间- Returns:
- the long
-
getPeriod
protected abstract long getPeriod()获取定时任务的执行频率- Returns:
- the long
-