Package io.github.qsy7.queue.impl.worker
Class WorkerSchedulerRunnable
java.lang.Object
io.github.qsy7.queue.api.job.AbstractRunnable
io.github.qsy7.queue.impl.worker.WorkerSchedulerRunnable
- All Implemented Interfaces:
Heartbeatable,AutoCloseable,Runnable
@Job(jobExecutionConfiguration=@JobExecutionConfiguration(system=true),
fixedDelay=@FixedDelay(fixedDelay=60L))
public class WorkerSchedulerRunnable
extends AbstractRunnable
-
Field Summary
FieldsFields inherited from class io.github.qsy7.queue.api.job.AbstractRunnable
currentJobExecution, executingThread, heartbeatInterval, interruptGracePeriodTimeout, queued, runningFuture -
Constructor Summary
ConstructorsConstructorDescriptionWorkerSchedulerRunnable(QueueService queueService, JobWorkerService jobWorkerService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoCall()protected voidFor any job that appears to have died, mark it as aborted.protected voidmarkJobExecutionAsAborted(io.github.qsy7.queue.api.model.AbstractQueued queued) protected voidFor any jobs we may pick up, attempt to assign them out to our local worker.Methods inherited from class io.github.qsy7.queue.api.job.AbstractRunnable
canEqual, close, doOnSuccess, equals, getCurrentJobExecution, getExecutingThread, getHeartbeatInterval, getInterruptGracePeriodTimeout, getQueued, getRunningFuture, hashCode, isRetryable, onError, onHeartbeat, onSuccess, retry, run, setCurrentJobExecution, setExecutingThread, setHeartbeatInterval, setInterruptGracePeriodTimeout, setJobWorkerService, setQueued, setRunningFuture, startCurrentJobExecution, toString, updateJobExecutionStatus, updateJobStatusMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.qsy7.heartbeat.Heartbeatable
getHeartbeatDuration
-
Field Details
-
queueService
-
jobWorkerService
-
-
Constructor Details
-
WorkerSchedulerRunnable
-
-
Method Details
-
doCall
protected void doCall()- Specified by:
doCallin classAbstractRunnable
-
markJobExecutionAsAborted
protected void markJobExecutionAsAborted()For any job that appears to have died, mark it as aborted. -
markJobExecutionAsAborted
protected void markJobExecutionAsAborted(io.github.qsy7.queue.api.model.AbstractQueued queued) -
rescheduleJobs
protected void rescheduleJobs()For any jobs we may pick up, attempt to assign them out to our local worker. -
getQueueService
-
getJobWorkerService
- Overrides:
getJobWorkerServicein classAbstractRunnable
-