public class SchedulerService extends Object
| Modifier and Type | Field and Description |
|---|---|
static SchedulerService |
instance
the instance
|
| Modifier and Type | Method and Description |
|---|---|
ScheduledFuture<?> |
executeOnce(Runnable task,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
executeOnce(String identifier) |
void |
register(String identifier,
Runnable task) |
void |
register(String identifier,
Runnable task,
long period,
TimeUnit unit) |
void |
resetTask(String identifier,
long period,
TimeUnit unit) |
void |
shutdown()
shut down
|
void |
stop(String identifier) |
public static SchedulerService instance
public void register(String identifier, Runnable task, long period, TimeUnit unit)
identifier - the task identifiertask - the taskperiod - the periodunit - the time unitpublic void register(String identifier, Runnable task)
identifier - the task identifiertask - the taskpublic ScheduledFuture<?> executeOnce(Runnable task, long delay, TimeUnit unit)
task - the taskdelay - the delayunit - the unitpublic ScheduledFuture<?> executeOnce(String identifier)
identifier - the identifierpublic void resetTask(String identifier, long period, TimeUnit unit)
identifier - the identifierperiod - the new periodunit - the new unitpublic void stop(String identifier)
identifier - the identifierpublic void shutdown()
Copyright © 2014-2016 Cinovo AG. All Rights Reserved.