Class JobBuilder
java.lang.Object
io.github.qsy7.queue.impl.worker.builder.JobBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChronoUnitprotected final longprotected final ChronoUnitprotected final long -
Constructor Summary
ConstructorsConstructorDescriptionJobBuilder(long interruptGracePeriodValue, ChronoUnit interruptGracePeriodUnits, long heartbeatIntervalValue, ChronoUnit heartbeatIntervalUnits) -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractRunnablegetRunnable(io.github.qsy7.queue.api.model.AbstractQueued queued) prepareCallableJob(io.github.qsy7.queue.api.model.AbstractQueued queued) This gets an instance of the SelfReschedulingJobCallableprotected voidsetup(AbstractRunnable runnable, io.github.qsy7.queue.api.model.AbstractQueued queued)
-
Field Details
-
interruptGracePeriodValue
protected final long interruptGracePeriodValue -
interruptGracePeriodUnits
-
heartbeatIntervalValue
protected final long heartbeatIntervalValue -
heartbeatIntervalUnits
-
-
Constructor Details
-
JobBuilder
@Inject public JobBuilder(long interruptGracePeriodValue, ChronoUnit interruptGracePeriodUnits, long heartbeatIntervalValue, ChronoUnit heartbeatIntervalUnits)
-
-
Method Details
-
prepareCallableJob
This gets an instance of the SelfReschedulingJobCallable- Parameters:
queued- the job to wrap in a runnable- Returns:
- a runnable wrapping the job
-
getRunnable
-
setup
protected void setup(AbstractRunnable runnable, io.github.qsy7.queue.api.model.AbstractQueued queued)
-