public class SchedulerSystem extends SchedulerSystem_Base
pt.ist.fenixframework.core.AbstractDomainObject.SerializedForm| Modifier and Type | Field and Description |
|---|---|
static LinkedBlockingQueue<TaskRunner> |
queue |
static Set<TaskRunner> |
runningTasks |
static Set<TaskSchedule> |
scheduledTasks |
| Modifier and Type | Method and Description |
|---|---|
static void |
addTask(String className,
Task taskAnnotation) |
static void |
destroy() |
static SchedulerSystem |
getInstance() |
static ExecutionLogRepository |
getLogRepository()
Returns the currently configured
ExecutionLogRepository. |
static String |
getLogsPath()
Used by CronTask to store tasks' output files and custom logging.
|
static String |
getTaskName(String className) |
static Map<String,Task> |
getTasks() |
Set<TaskSchedule> |
getTaskScheduleSet() |
static void |
init()
This method starts the scheduler if lease is expired.
|
static Boolean |
isActive() |
static Boolean |
isRunning() |
static void |
queue(TaskRunner taskRunner) |
static void |
schedule(TaskSchedule schedule)
Schedules a task.
|
static void |
setLogRepository(ExecutionLogRepository repo)
Configures a new log repository to be used by the scheduler system.
|
static void |
unschedule(TaskSchedule schedule)
Remove schedule from the scheduler.
|
addTaskSchedule, getBennu, getLease, getLoggingStorage, getRelationSchedulerSystemLocalFileSystemStorage, getRelationSchedulerSystemSchedulerSystem, getRelationTaskTaskSchedule, removeTaskSchedule, setBennu, setLease, setLoggingStoragecheckForDeletionBlockers, deleteDomainObject, ensureOid, equals, getDeletionBlockers, getDomainModel, getExternalId, getOid, hashCode, init$Instance, makeSerializedForm, toString, writeReplacepublic static LinkedBlockingQueue<TaskRunner> queue
public static Set<TaskRunner> runningTasks
public static Set<TaskSchedule> scheduledTasks
public static SchedulerSystem getInstance()
public Set<TaskSchedule> getTaskScheduleSet()
getTaskScheduleSet in class SchedulerSystem_Basepublic static Boolean isRunning()
public static Boolean isActive()
public static void init()
public static void schedule(TaskSchedule schedule)
schedule - The task to be added to the queuepublic static void unschedule(TaskSchedule schedule)
schedule - The task to be removed from the queuepublic static void destroy()
public static String getLogsPath()
public static void queue(TaskRunner taskRunner)
public static void setLogRepository(ExecutionLogRepository repo)
repo - The new log repositoryNullPointerException - If the provided repository is nullpublic static ExecutionLogRepository getLogRepository()
ExecutionLogRepository.
By default, a FileSystemLogRepository is used, with a dispersion factor of 3.Copyright © 2018 FenixEdu. All rights reserved.