public class DefaultTimerTaskService extends Object implements TimerTaskService
| Constructor and Description |
|---|
DefaultTimerTaskService() |
DefaultTimerTaskService(long tickMs,
int wheelSize) |
DefaultTimerTaskService(SystemTimer systemTimer) |
DefaultTimerTaskService(SystemTimer systemTimer,
TimingWheelThread timingWheelThread) |
| Modifier and Type | Method and Description |
|---|---|
<T extends TimerTask> |
add(T timerTask)
添加 ack 任务
|
<T extends TimerTask> |
addTask(Function<SystemTimer,T> consumer)
添加 ack 任务
|
void |
start()
启动
|
void |
stop()
停止
|
public DefaultTimerTaskService()
public DefaultTimerTaskService(long tickMs,
int wheelSize)
public DefaultTimerTaskService(SystemTimer systemTimer)
public DefaultTimerTaskService(SystemTimer systemTimer, TimingWheelThread timingWheelThread)
public <T extends TimerTask> T add(T timerTask)
TimerTaskServiceadd in interface TimerTaskServiceT - 泛型timerTask - timerTaskpublic <T extends TimerTask> T addTask(Function<SystemTimer,T> consumer)
TimerTaskServiceaddTask in interface TimerTaskServiceT - 泛型consumer - timerTask consumerpublic void start()
TimerTaskServicestart in interface TimerTaskServicepublic void stop()
TimerTaskServicestop in interface TimerTaskServiceCopyright © 2025. All rights reserved.