Class LiveGraphRegistry
java.lang.Object
io.jenkins.plugins.pipelinegraphview.livestate.LiveGraphRegistry
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, 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.
-
Constructor Summary
Constructors -
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, LiveGraphCacheKey key, PipelineStepList steps) cachedAllSteps(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key) cachedGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key) voidcacheGraph(org.jenkinsci.plugins.workflow.job.WorkflowRun run, LiveGraphCacheKey key, PipelineGraph graph) cacheKey(org.jenkinsci.plugins.workflow.job.WorkflowRun run) Returns the key a cached result must match, 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.pausedNodeIds(org.jenkinsci.plugins.workflow.job.WorkflowRun run) The running steps that are paused, e.g.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.
-
Constructor Details
-
LiveGraphRegistry
public LiveGraphRegistry()
-
-
Method Details
-
get
-
cacheKey
Returns the key a cached result must match, 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, 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
The running steps that are paused, e.g. waiting for input or a lock. -
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, LiveGraphCacheKey key) -
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
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.
-