Interface IDaemonScheduler
-
public interface IDaemonSchedulerDaemon scheduler. Responsible for ensuring on demand or timely daemon execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanenqueue(DaemonEntry entry, long nDelay, TimeUnit unit)Enqueue a daemon for execution in the immediate futurevoidschedule(DaemonEntry entry, long nInitialDelay, TimeUnit unit)Schedule a daemon execution.voidshutdown()Perform an orderly shutdown, stopping daemon executionvoidunSchedule(DaemonEntry daemonEntry)Unschedule a daemon
-
-
-
Field Detail
-
BEAN_NAME
static final String BEAN_NAME
The bean name- See Also:
- Constant Field Values
-
-
Method Detail
-
enqueue
boolean enqueue(DaemonEntry entry, long nDelay, TimeUnit unit)
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
void schedule(DaemonEntry entry, long nInitialDelay, TimeUnit unit)
Schedule a daemon execution.- Parameters:
entry- the daemon entrynInitialDelay- the initial delay before the first executionunit- the unit ofnInitialDelayargument- See Also:
DaemonEntry.getInterval()
-
unSchedule
void unSchedule(DaemonEntry daemonEntry)
Unschedule a daemon- Parameters:
entry- the daemon entry
-
shutdown
void shutdown()
Perform an orderly shutdown, stopping daemon execution
-
-