public abstract class TaskBuilder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
create()
创建定时器
|
static ScheduledFuture<?> |
schedule(Runnable task,
long period,
TimeUnit timeUnit) |
static ScheduledFuture<?> |
schedule(Runnable task,
String periodTimeVal) |
static ScheduledFuture<?> |
scheduleDelay(Runnable task,
long delay,
long period,
TimeUnit timeUnit) |
static ScheduledFuture<?> |
scheduleDelay(Runnable task,
String delayTimeVal,
String periodTimeVal) |
static ScheduledFuture<?> |
scheduleOnce(Runnable task) |
static ScheduledFuture<?> |
scheduleOnceDelay(Runnable task,
long delay,
TimeUnit timeUnit) |
static ScheduledFuture<?> |
scheduleOnceDelay(Runnable task,
String delayTimeVal) |
static void |
shutdown()
销毁全局定时器
|
static List<Runnable> |
shutdownNow()
销毁全局定时器
|
public static ScheduledFuture<?> schedule(Runnable task, String periodTimeVal)
public static ScheduledFuture<?> schedule(Runnable task, long period, TimeUnit timeUnit)
public static ScheduledFuture<?> scheduleDelay(Runnable task, String delayTimeVal, String periodTimeVal)
public static ScheduledFuture<?> scheduleDelay(Runnable task, long delay, long period, TimeUnit timeUnit)
public static ScheduledFuture<?> scheduleOnce(Runnable task)
public static ScheduledFuture<?> scheduleOnceDelay(Runnable task, String delayTimeVal)
public static ScheduledFuture<?> scheduleOnceDelay(Runnable task, long delay, TimeUnit timeUnit)
public static void create()
public static void shutdown()
Copyright © 2022. All rights reserved.