Class Task

java.lang.Object
org.jobrunr.server.tasks.Task
Direct Known Subclasses:
AbstractJobStewardTask, AbstractJobZooKeeperTask

public abstract class Task extends Object
  • Field Details

    • LOGGER

      protected final org.slf4j.Logger LOGGER
    • backgroundJobServer

      protected final BackgroundJobServer backgroundJobServer
    • storageProvider

      protected final StorageProvider storageProvider
    • jobFilterUtils

      protected final JobFilterUtils jobFilterUtils
    • runInfo

      protected TaskRunInfo runInfo
  • Constructor Details

  • Method Details

    • run

      public void run(TaskRunInfo runInfo)
      This method is not thread-safe and should not be accessed concurrently by different Threads.
      Parameters:
      runInfo - all information related to the current run (like startTime, ...).
    • runTask

      protected abstract void runTask()
    • convertAndProcessJobs

      protected final <T> void convertAndProcessJobs(Collection<T> items, Function<T,Job> toJobFunction)
    • saveAndRunJobFilters

      protected void saveAndRunJobFilters(List<Job> jobs)
    • backgroundJobServerConfiguration

      protected BackgroundJobServerConfigurationReader backgroundJobServerConfiguration()
    • runStartTime

      protected Instant runStartTime()
    • pollIntervalInSecondsTimeBoxIsAboutToPass

      protected boolean pollIntervalInSecondsTimeBoxIsAboutToPass()