Interface IDaemonScheduler
public interface IDaemonScheduler
Daemon scheduler. Responsible for ensuring on demand or timely daemon execution.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanenqueue(DaemonEntry entry, long nDelay, TimeUnit unit) Enqueue a daemon for execution in the immediate futuredefault booleanisValidCronExpression(String strDaemonCron) Checks if the given cron expression is valid towards the current daemon scheduler.voidschedule(DaemonEntry entry, long nInitialDelay, TimeUnit unit) Schedule a daemon execution.voidshutdown()Perform an orderly shutdown, stopping daemon executionvoidunSchedule(DaemonEntry daemonEntry) Unschedule a daemon
-
Method Details
-
enqueue
Enqueue a daemon for execution in the immediate future- Parameters:
entry- the daemon entryunit- the delay before executionnDelay- the unit ofnDelayargument- Returns:
trueif the daemon was successfully queued,falseotherwise, for instance if the underlying queue is over capacity
-
schedule
Schedule a daemon execution.- Parameters:
entry- the daemon entrynInitialDelay- the initial delay before the first executionunit- the unit ofnInitialDelayargument- See Also:
-
unSchedule
Unschedule a daemon- Parameters:
entry- the daemon entry
-
shutdown
void shutdown()Perform an orderly shutdown, stopping daemon execution -
isValidCronExpression
Checks if the given cron expression is valid towards the current daemon scheduler.- Parameters:
strDaemonCron- the cron expression- Returns:
- true is the cron expression is valid for the current daemon scheduler
-