Class AsyncJobRegistry

java.lang.Object
com.kingsrook.qqq.backend.core.actions.async.AsyncJobRegistry

public final class AsyncJobRegistry extends Object
The async jobs running on this node, and how their statuses reach a shared (multi-node) state provider (spec 2026-10-15-cluster-ha-design, section B): - progress writes are throttled per job (state changes are not); - before each write, a cancel requested from any node is read back; - a heartbeat re-writes each running job's status (and flushes throttled progress), so a reader can tell a job whose node died - its status says RUNNING but its heartbeat is stale - and report it as failed. With in-memory state none of this applies: writes go straight through.
  • Field Details

  • Method Details

    • runningCount

      public static int runningCount()
      Number of async jobs running on this node.
    • awaitIdle

      public static boolean awaitIdle(Duration timeout)
      Wait (up to the timeout) for this node's running jobs to finish. Returns whether all did.