
public final class AgentPeriodicTaskService extends Object implements ServiceLifecycle, HasLifecycle, ClearAlertHandler, AgentService
| Modifier and Type | Class and Description |
|---|---|
class |
AgentPeriodicTaskService.AgentPeriodicTaskExecutionHandler |
ClearAlertHandler.ClearAlertCode| Constructor and Description |
|---|
AgentPeriodicTaskService() |
| Modifier and Type | Method and Description |
|---|---|
void |
build()
First lifecycle hook.
|
ClearAlertHandler.ClearAlertCode |
canClearAlert(Alert alert,
AlertState state)
Callback to clear an
Alert instance. |
Scheduler |
createScheduler(String name,
int nThreads)
Create a scheduler by name and the default number of threads.
|
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.
|
void |
preBuild() |
void |
preInit() |
void |
scheduleAgentPeriodicTask(AgentPeriodicTask task)
Schedule a PeriodicTask.
|
void |
scheduleAgentPeriodicTask(AgentPeriodicTask task,
String schedulerName) |
void |
setPeriodicTaskPeriod(String taskName,
Duration period)
Change the period of a PeriodicTask.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterInit, afterStart, preShutdown, preStartinit, postBuild, postInit, postShutdown, postStart, shutdown, startstartForAgentpublic String getAgentServiceName()
AgentServicegetAgentServiceName in interface AgentServicepublic void preBuild()
preBuild in interface ServiceLifecyclepublic void build()
HasLifecyclebuild in interface HasLifecyclepublic void preInit()
preInit in interface ServiceLifecyclepublic Scheduler createScheduler(String name, int nThreads)
name - nThreads - public void scheduleAgentPeriodicTask(AgentPeriodicTask task)
task - The PeriodicTask to schedulepublic void scheduleAgentPeriodicTask(AgentPeriodicTask task, String schedulerName)
public 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 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 © 2020 LSST. All rights reserved.