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).longReturns the target execution time of the job.booleanReturnstrueif has to be executed ASAP.booleanReturnstrueif this job executes periodically.voidSets the job ID.voidsetTargetExecutionTime(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()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
-