Class DefaultMilestoneStorage

java.lang.Object
org.jenkinsci.plugins.pipeline.milestone.DefaultMilestoneStorage
All Implemented Interfaces:
ExtensionPoint, MilestoneStorage

@Extension(ordinal=-1.0) @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class DefaultMilestoneStorage extends Object implements MilestoneStorage
The default implementation storing milestones in memory.
  • Constructor Details

    • DefaultMilestoneStorage

      public DefaultMilestoneStorage()
  • Method Details

    • store

      public Map<Integer,Integer> store(@NonNull Run<?,?> run, @CheckForNull Integer ordinal)
      Description copied from interface: MilestoneStorage
      Records passing a milestone.
      Specified by:
      store in interface MilestoneStorage
      Parameters:
      run - The run passing the milestone.
      ordinal - the ordinal of the milestone gettting passed. May be null to record build starting.
      Returns:
      The list of milestones for the job after storing the new one.
    • clear

      @NonNull public MilestoneStorage.ClearResult clear(@NonNull Run<?,?> run)
      Description copied from interface: MilestoneStorage
      Clears a Run from recorded milestones.
      Specified by:
      clear in interface MilestoneStorage
      Parameters:
      run - The completed run.
      Returns:
      The result from clearing the run.
    • onDeletedJob

      public void onDeletedJob(@NonNull Job<?,?> job)
      Description copied from interface: MilestoneStorage
      Called when a job gets deleted, allowing the implementation to perform required cleanup.
      Specified by:
      onDeletedJob in interface MilestoneStorage
      Parameters:
      job - The job that was deleted.