Interface JavaScriptJob
- All Superinterfaces:
Comparable<JavaScriptJob>
,Runnable
- All Known Implementing Classes:
BasicJavaScriptJob
,JavaScriptExecutionJob
,JavaScriptFunctionJob
,JavaScriptStringJob
,JavascriptXMLHttpRequestJob
,WorkerJob
A JavaScript-triggered background job managed by a
JavaScriptJobManager
.-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the job ID.Returns the amount of time to wait between executions of this job (may benull
).long
Returns the target execution time of the job.boolean
Returnstrue
if has to be executed ASAP.boolean
Returnstrue
if this job executes periodically.void
Sets the job ID.void
setTargetExecutionTime
(long targetExecutionTime) Sets the target execution time of the job.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getId
Integer getId()Returns the job ID.- Returns:
- the job ID
-
setId
Sets the job ID.- Parameters:
id
- the job ID
-
getTargetExecutionTime
long getTargetExecutionTime()Returns the target execution time of the job.- Returns:
- the target execution time in ms
-
setTargetExecutionTime
void setTargetExecutionTime(long targetExecutionTime) Sets the target execution time of the job.- Parameters:
targetExecutionTime
- the new target execution time.
-
getPeriod
Integer getPeriod()Returns the amount of time to wait between executions of this job (may benull
).- Returns:
- the amount of time to wait between executions of this job (may be
null
)
-
isPeriodic
boolean isPeriodic()Returnstrue
if this job executes periodically.- Returns:
true
if this job executes periodically
-
isExecuteAsap
boolean isExecuteAsap()Returnstrue
if has to be executed ASAP.- Returns:
true
if has to be executed ASAP
-