Class GuiceDailyDaemon
java.lang.Object
com.peterphi.std.threading.Daemon
com.peterphi.std.guice.common.daemon.GuiceDaemon
com.peterphi.std.guice.common.daemon.GuiceRecurringDaemon
com.peterphi.std.guice.common.daemon.GuiceScheduledDaemon
com.peterphi.std.guice.common.daemon.GuiceDailyDaemon
- All Implemented Interfaces:
GuiceLifecycleListener
,StoppableService
,Runnable
A recurring daemon that runs once a day (although it can be triggered to run early)
-
Field Summary
Fields inherited from class com.peterphi.std.guice.common.daemon.GuiceRecurringDaemon
sleepTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Instant
Returns the time this daemon is configured to run atvoid
setTimeFromConfigIfSet
(GuiceConfig config) Overrides the default time set in the constructor with the value from the application config (if set)Methods inherited from class com.peterphi.std.guice.common.daemon.GuiceScheduledDaemon
getInitialSleepTime, getSleepTime
Methods inherited from class com.peterphi.std.guice.common.daemon.GuiceRecurringDaemon
execute, executeException, getCalls, getExceptions, getLastRan, isUserCodeRunning, makeNextRunVerbose, postConstruct, run, setSleepTime, setSleepTimeFromConfigIfSet, shouldContinue, trigger
Methods inherited from class com.peterphi.std.guice.common.daemon.GuiceDaemon
getBreaker, getBreakerNames, getName, getThreadName, notifyBreakerChange, shouldStartAsDaemon, shutdown, sleep, sleep
Methods inherited from class com.peterphi.std.threading.Daemon
getTextState, getTextStateUpdated, getThread, isRunning, isThreadRunning, setTextState, startThread, startThread, stopAll, stopThread, waitForTermination, waitForTermination
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.peterphi.std.guice.common.shutdown.iface.StoppableService
preShutdown
-
Constructor Details
-
GuiceDailyDaemon
-
-
Method Details
-
setTimeFromConfigIfSet
Overrides the default time set in the constructor with the value from the application config (if set)- Parameters:
config
-- Throws:
DateTimeParseException
- if the LocalTime stored in config is invalid
-
getScheduledTime
Returns the time this daemon is configured to run at- Returns:
-
getNextRunTime
- Specified by:
getNextRunTime
in classGuiceScheduledDaemon
-