
public final class AgentPeriodicTaskService extends Object implements ServiceLifecycle, HasLifecycle, AgentMonitor, ClearAlertHandler, AgentService
ClearAlertHandler.ClearAlertCode| Constructor and Description |
|---|
AgentPeriodicTaskService() |
| Modifier and Type | Method and Description |
|---|---|
ClearAlertHandler.ClearAlertCode |
canClearAlert(Alert alert,
AlertState state)
Callback to clear an
Alert instance. |
String |
getAgentMonitorDescription()
Get the description for this AgentMonitor.
|
String |
getAgentMonitorStatus(boolean useCcsBuses)
This method should return the string "OK" if everything is working as
expected.
|
List<String> |
getAgentPeriodicTaskNames()
Get the list of names of the scheduled tasks.
|
String |
getAgentServiceName()
Get the name of this service.
|
Duration |
getPeriodicTaskPeriod(String taskName)
Get the period of a PeriodicTaks.
|
List<PeriodicTask> |
getPeriodicTasks() |
void |
postShutdown()
Called from the enclosing
Subsystem when
org.lsst.ccs.Subsystem#shutdown() has been called after shtudownNow has
been invoked on all the children. |
void |
preBuild() |
void |
preInit() |
void |
scheduleAgentPeriodicTask(AgentPeriodicTask task)
Schedule a PeriodicTask.
|
void |
setPeriodicTaskPeriod(String taskName,
Duration period)
Change the period of a PeriodicTask.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterInit, preShutdown, preStartbuild, init, postBuild, postInit, postStart, shutdown, startcanClearAlertstartForAgentpublic String getAgentServiceName()
AgentServicegetAgentServiceName in interface AgentServicepublic void preBuild()
preBuild in interface ServiceLifecyclepublic void preInit()
preInit in interface ServiceLifecyclepublic void postShutdown()
HasLifecycleSubsystem when
org.lsst.ccs.Subsystem#shutdown() has been called after shtudownNow has
been invoked on all the children. At the time it
is called :
PhaseState is CLOSING.
HardwareController.checkStopped() has
been called
postShutdown in interface HasLifecyclepublic void scheduleAgentPeriodicTask(AgentPeriodicTask task)
task - The PeriodicTask to schedulepublic Duration getPeriodicTaskPeriod(String taskName)
taskName - The name of the taskpublic void setPeriodicTaskPeriod(String taskName, Duration period)
taskName - The name of the taskperiod - The period Duration@Command(name="getAgentPeriodicTaskNames",
description="Get the list of the names of the scheduled tasks",
type=QUERY,
category=SYSTEM)
public List<String> getAgentPeriodicTaskNames()
public List<PeriodicTask> getPeriodicTasks()
public String getAgentMonitorStatus(boolean useCcsBuses)
AgentMonitorgetAgentMonitorStatus in interface AgentMonitoruseCcsBuses - a boolean to tell if the CCS buses should be used: for
example to raise an Alert. This is true when the method is invoked from
the periodic task. If it's invoked form JMX its value is false.public String getAgentMonitorDescription()
AgentMonitorgetAgentMonitorDescription in interface AgentMonitorpublic ClearAlertHandler.ClearAlertCode canClearAlert(Alert alert, AlertState state)
ClearAlertHandlerAlert instance.
Return a ClearAlertCode for the provided Alert.canClearAlert in interface ClearAlertHandleralert - The Alert instance to clear.state - The AlertState for the provided Alert.Copyright © 2019 LSST. All rights reserved.