public class Scheduler extends Object implements ThreadFactory
| Modifier and Type | Method and Description |
|---|---|
Thread |
newThread(Runnable r) |
ScheduledFuture<?> |
schedule(Runnable runnable,
long initialDelayMillis) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable runnable,
long initialDelayMillis,
long refreshIntervalMillis) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable runnable,
long initialDelayMillis,
long refreshIntervalMillis) |
void |
shutdownNow()
Terminate all actively executing tasks and shutdown the scheduler.
|
Future<?> |
submit(Runnable runnable) |
void |
unschedule(ScheduledFuture<?> future) |
public Scheduler(String threadNamePrefix)
public ScheduledFuture<?> schedule(Runnable runnable, long initialDelayMillis)
public ScheduledFuture<?> scheduleAtFixedRate(Runnable runnable, long initialDelayMillis, long refreshIntervalMillis)
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable runnable, long initialDelayMillis, long refreshIntervalMillis)
public void unschedule(ScheduledFuture<?> future)
public void shutdownNow()
public Thread newThread(Runnable r)
newThread in interface ThreadFactoryCopyright © 2017. All rights reserved.