Class WarningActionCache

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

public final class WarningActionCache extends Object
Per-run cache of WarningAction lookups between two flow nodes. The underlying scan in StatusAndTiming.findWorstWarningBetween walks every node between a stage's start and end, which dominates /allSteps on large completed runs. WarningActions don't change after attach, so once both endpoints exist (and for completed blocks, the set of inner nodes is fixed) the result is stable and can be memoised.
  • Method Details

    • getOrCompute

      @CheckForNull public org.jenkinsci.plugins.workflow.actions.WarningAction getOrCompute(@NonNull String startId, @NonNull String endId, @NonNull Supplier<org.jenkinsci.plugins.workflow.actions.WarningAction> computer)
      Returns the cached result for (startId, endId), or invokes computer to resolve and caches the result before returning.