Class LiveGraphRegistry
java.lang.Object
io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry
Singleton holding one
LiveGraphState per in-progress run.
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, defaulttrue) — set tofalseto disable the live-state path entirely and force scanner fallback.io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry.size(int, default512) — max concurrent in-progress runs tracked. Extra runs use the scanner path until an entry evicts.
-
Method Summary
Modifier and TypeMethodDescriptionallStepsComputeLock(org.jenkinsci.plugins.workflow.job.WorkflowRun run) SeegraphComputeLock(WorkflowRun)— the matching lock for the steps path.blockResolutionCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) Returns theBlockResolutionCachefor this execution, ornullwhen the live state isn't present.voidcacheAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long version, PipelineStepList steps) cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long minVersion) cachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long minVersion) Returns a previously-cachedPipelineGraphfor this run if it was computed at or afterminVersion, otherwisenull.voidcacheGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long version, PipelineGraph graph) currentVersion(org.jenkinsci.plugins.workflow.job.WorkflowRun run) Returns the state's current version, ornullif there's no usable state (feature disabled, not populated, poisoned, or not yet ready).static LiveGraphRegistryget()graphComputeLock(org.jenkinsci.plugins.workflow.job.WorkflowRun run) Returns a per-run monitor that callers can synchronise on to dedup concurrent graph rebuilds.skippedStageCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) Returns theSkippedStageCachefor this execution, ornullwhen the live state isn't present.snapshot(org.jenkinsci.plugins.workflow.job.WorkflowRun run) Returns a snapshot of the live state for this run, ornullif none exists (feature disabled, state never populated, state poisoned).warningActionCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) Returns theWarningActionCachefor this execution, ornullwhen the live state isn't present.
-
Method Details
-
get
-
currentVersion
Returns the state's current version, ornullif there's no usable state (feature disabled, not populated, poisoned, or not yet ready). Cheap — lets callers short-circuit tocachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun, long)/cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun, long)without paying for a full snapshot first. -
snapshot
Returns a snapshot of the live state for this run, ornullif none exists (feature disabled, state never populated, state poisoned). Callers must treatnullas "fall back to the scanner path." -
cachedGraph
public PipelineGraph cachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long minVersion) Returns a previously-cachedPipelineGraphfor this run if it was computed at or afterminVersion, otherwisenull. UseLiveGraphSnapshot.version()as the argument — cache entries older than the caller's snapshot are rejected. -
cacheGraph
public void cacheGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long version, PipelineGraph graph) -
cachedAllSteps
public PipelineStepList cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long minVersion) -
cacheAllSteps
public void cacheAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, long version, PipelineStepList steps) -
graphComputeLock
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
SeegraphComputeLock(WorkflowRun)— the matching lock for the steps path. -
warningActionCache
@CheckForNull public WarningActionCache warningActionCache(org.jenkinsci.plugins.workflow.flow.FlowExecution execution) Returns theWarningActionCachefor this execution, ornullwhen 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 theBlockResolutionCachefor this execution, ornullwhen 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 theSkippedStageCachefor this execution, ornullwhen the live state isn't present. Callers fall back to uncached action-list walks on null.
-