Class LiveGraphRegistry

java.lang.Object
io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry

@Extension public final class LiveGraphRegistry extends Object
Holds one LiveGraphState per in-progress run of this Jenkins. Entries are created on demand by the listener / lifecycle code, removed on completion, and otherwise bounded by a Caffeine LRU so abandoned entries (deleted runs, listener bugs) don't leak.

Operator knobs:

  • io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry.enabled (boolean, default true) — set to false to disable the live-state path entirely and force scanner fallback.
  • io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry.size (int, default 512) — max concurrent in-progress runs tracked. Extra runs use the scanner path until an entry evicts.
  • Constructor Details

    • LiveGraphRegistry

      public LiveGraphRegistry()
  • Method Details

    • get

      public static LiveGraphRegistry get()
    • cacheKey

      @CheckForNull public LiveGraphCacheKey cacheKey(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      Returns the key a cached result must match, or null if there's no usable state (feature disabled, not populated, poisoned, or not yet ready). Cheap — lets callers short-circuit to cachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun, io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphCacheKey)/cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun, io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphCacheKey) without paying for a full snapshot first.
    • pausedNodeIds

      public static Set<String> pausedNodeIds(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      The running steps that are paused, e.g. waiting for input or a lock.
    • snapshot

      public LiveGraphSnapshot snapshot(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      Returns a snapshot of the live state for this run, or null if none exists (feature disabled, state never populated, state poisoned). Callers must treat null as "fall back to the scanner path."
    • cachedGraph

      public PipelineGraph cachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key)
      Returns a previously-cached PipelineGraph for this run if it satisfies key, otherwise null.
    • cacheGraph

      public void cacheGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key, PipelineGraph graph)
    • cachedAllSteps

      public PipelineStepList cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key)
    • cacheAllSteps

      public void cacheAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key, PipelineStepList steps)
    • graphComputeLock

      @CheckForNull public Object graphComputeLock(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      Returns a per-run monitor that callers can synchronise on to dedup concurrent graph rebuilds. Null when the live state isn't present (caller just computes directly).
    • allStepsComputeLock

      @CheckForNull public Object allStepsComputeLock(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      See graphComputeLock(WorkflowRun) — the matching lock for the steps path.
    • warningActionCache

      @CheckForNull public WarningActionCache warningActionCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
      Returns the WarningActionCache for this execution, or null when the live state isn't present. Callers fall back to uncached scans on null.
    • blockResolutionCache

      @CheckForNull public BlockResolutionCache blockResolutionCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
      Returns the BlockResolutionCache for this execution, or null when the live state isn't present. Callers fall back to uncached resolution on null.
    • skippedStageCache

      @CheckForNull public SkippedStageCache skippedStageCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution)
      Returns the SkippedStageCache for this execution, or null when the live state isn't present. Callers fall back to uncached action-list walks on null.