Interface MilestoneStorage

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
DefaultMilestoneStorage

public interface MilestoneStorage extends ExtensionPoint
Manages persistence of active milestones and cancellation of older builds as needed.
  • Field Details

    • LOGGER

      static final Logger LOGGER
  • Method Details

    • store

      Map<Integer,Integer> store(@NonNull Run<?,?> run, @CheckForNull Integer ordinal)
      Records passing a milestone.
      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 MilestoneStorage.ClearResult clear(@NonNull Run<?,?> run)
      Clears a Run from recorded milestones.
      Parameters:
      run - The completed run.
      Returns:
      The result from clearing the run.
    • onDeletedJob

      void onDeletedJob(@NonNull Job<?,?> job)
      Called when a job gets deleted, allowing the implementation to perform required cleanup.
      Parameters:
      job - The job that was deleted.
    • cancel

      default void cancel(Job<?,?> job, int buildNumber, @NonNull String externalizableId)
      Cancels the given run due to another run passing a milestone.
      Parameters:
      job - the job for which the run is getting cancelled
      buildNumber - the build number of the run to cancel
      externalizableId - the externalizable id for the run causing the cancellation.