| 构造器和说明 |
|---|
HashedWheelTimer(long tickDuration,
int ticksPerWheel) |
HashedWheelTimer(long tickDuration,
int ticksPerWheel,
int processThreadNum)
新建时间轮定时器
|
public HashedWheelTimer(long tickDuration,
int ticksPerWheel)
public HashedWheelTimer(long tickDuration,
int ticksPerWheel,
int processThreadNum)
tickDuration - 时间间隔,单位毫秒(ms)ticksPerWheel - 轮盘个数processThreadNum - 处理任务的线程个数,0代表不启用新线程(如果定时任务需要耗时操作,请启用线程池)Copyright © 2024. All rights reserved.