Class NetworkConfigReloadDaemon
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.serviceprops.net.NetworkConfigReloadDaemon
- All Implemented Interfaces:
GuiceLifecycleListener,StoppableService,Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionUniquely identifies us to the configuration provider (e.g.Fields inherited from class com.peterphi.std.guice.common.daemon.GuiceRecurringDaemon
sleepTime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute()Run one iteration of the daemonvoidregister(NetworkConfig config) Register an additional network config to keep up-to-date.voidreload()Reload the network configuration immediatelyMethods inherited from class com.peterphi.std.guice.common.daemon.GuiceRecurringDaemon
executeException, getCalls, getExceptions, getInitialSleepTime, getLastRan, getSleepTime, isUserCodeRunning, makeNextRunVerbose, postConstruct, run, setSleepTime, setSleepTimeFromConfigIfSet, shouldContinue, triggerMethods inherited from class com.peterphi.std.guice.common.daemon.GuiceDaemon
getBreaker, getBreakerNames, getName, getThreadName, notifyBreakerChange, shouldStartAsDaemon, shutdown, sleep, sleepMethods inherited from class com.peterphi.std.threading.Daemon
getTextState, getTextStateUpdated, getThread, isRunning, isThreadRunning, setTextState, startThread, startThread, stopAll, stopThread, waitForTermination, waitForTerminationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.peterphi.std.guice.common.shutdown.iface.StoppableService
preShutdown
-
Field Details
-
configInstanceId
Uniquely identifies us to the configuration provider (e.g. for proactive updates)
-
-
Constructor Details
-
NetworkConfigReloadDaemon
@Inject protected NetworkConfigReloadDaemon()
-
-
Method Details
-
execute
Description copied from class:GuiceRecurringDaemonRun one iteration of the daemon- Specified by:
executein classGuiceRecurringDaemon- Throws:
Exception- if an exception occurs (the exception will be passed toGuiceRecurringDaemon.executeException(Throwable)but otherwise ignored)
-
reload
public void reload()Reload the network configuration immediately -
register
Register an additional network config to keep up-to-date. Attempts to synchronously eagerly load this config at register time- Parameters:
config-
-