Class TaskLastRun
java.lang.Object
org.deltava.taskman.TaskLastRun
- All Implemented Interfaces:
Serializable
,Comparable<TaskLastRun>
A bean to store last execution data for a Scheduled Task.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskLastRun
(String name, Instant dt, long execTime) Creates a new Task execution data bean. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(TaskLastRun tlr2) Compares two task execution beans by comparing their names and last run date/times.long
Returns the task's last execution duration.Returns the last execution time for the Scheduled Task.getName()
Returns the Schedule Task name.
-
Constructor Details
-
TaskLastRun
Creates a new Task execution data bean.- Parameters:
name
- the name of the Taskdt
- the last execution date/timeexecTime
- the execution duration in milliseconds- Throws:
NullPointerException
- if name is null- See Also:
-
-
Method Details
-
getName
-
getLastRun
Returns the last execution time for the Scheduled Task.- Returns:
- the date/time the task last started, or null if never run
-
getExecTime
public long getExecTime()Returns the task's last execution duration.- Returns:
- the duration in milliseconds
-
compareTo
Compares two task execution beans by comparing their names and last run date/times.- Specified by:
compareTo
in interfaceComparable<TaskLastRun>
-