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.IntegergetId()Returns the job ID.java.lang.IntegergetPeriod()Returns the amount of time to wait between executions of this job (may benull).longgetTargetExecutionTime()Returns the target execution time of the job.booleanisExecuteAsap()Returnstrueif has to be executed ASAP.booleanisPeriodic()Returnstrueif this job executes periodically.voidsetId(java.lang.Integer id)Sets the job ID.voidsetTargetExecutionTime(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()
Returnstrueif this job executes periodically.- Returns:
trueif this job executes periodically
-
isExecuteAsap
boolean isExecuteAsap()
Returnstrueif has to be executed ASAP.- Returns:
trueif has to be executed ASAP
-
-