Interface JavaScriptJob
-
- All Superinterfaces:
java.lang.Comparable<JavaScriptJob>
,java.lang.Runnable
- All Known Implementing Classes:
BasicJavaScriptJob
,JavaScriptExecutionJob
,JavaScriptFunctionJob
,JavaScriptStringJob
,JavascriptXMLHttpRequestJob
,WorkerJob
public interface JavaScriptJob extends java.lang.Runnable, java.lang.Comparable<JavaScriptJob>
A JavaScript-triggered background job managed by aJavaScriptJobManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Integer
getId()
Returns the job ID.java.lang.Integer
getPeriod()
Returns the amount of time to wait between executions of this job (may benull
).long
getTargetExecutionTime()
Returns the target execution time of the job.boolean
isExecuteAsap()
Returnstrue
if has to be executed ASAP.boolean
isPeriodic()
Returnstrue
if this job executes periodically.void
setId(java.lang.Integer id)
Sets the job ID.void
setTargetExecutionTime(long targetExecutionTime)
Sets the target execution time of the job.
-
-
-
Method Detail
-
getId
java.lang.Integer getId()
Returns the job ID.- Returns:
- the job ID
-
setId
void setId(java.lang.Integer id)
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
java.lang.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
-
-