Class InlineJobTracker

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.runtime.InlineJobTracker

public class InlineJobTracker extends Object
Per-pod mirrors of already-running inline processes. These have no chunks and cannot survive loss of the process's pod.
  • Field Details

  • Constructor Details

    • InlineJobTracker

      public InlineJobTracker(DurableJobStore store, String podId)
      Construct the tracker owned by the runtime.
  • Method Details

    • track

      public Integer track(String processName, String processUUID, String jobUUID) throws QException
      Validate process ownership before creating or returning a tracking job.
      Throws:
      QException
    • runAgain

      public Integer runAgain(QRecord parent) throws QException
      Start a fresh inline run with the captured process values. Fast completion is valid here: the tracking row is immediately finalized in that case.
      Throws:
      QException
    • startTracked

      public Integer startTracked(String processName, String label, String owner, String clientChannel, String tableName, Serializable recordId) throws QException
      Start a tracking job that no process backs (see JobTracking): RUNNING, owned by this pod, failed by the reaper if this pod goes away.
      Throws:
      QException
    • onCancel

      public void onCancel(Integer jobId, Runnable listener)
      Register the listener fired (once, on this pod) when the job is cancelled.
    • heartbeat

      public void heartbeat(Integer jobId) throws QException
      Record that a tracking job is alive.
      Throws:
      QException
    • finishTracked

      public void finishTracked(Integer jobId, JobStatus terminal, String message) throws QException
      Finalize a tracking job (first terminal status wins).
      Throws:
      QException
    • tick

      public void tick()
      Mirror each active process once per runtime tick.
    • reap

      public void reap() throws QException
      Fail inline jobs whose worker heartbeat has disappeared.
      Throws:
      QException