Record Class Consolidated

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Consolidated
Record Components:
state - IDLE when the view never ran its pipelines, otherwise the state of the run going on or of the last one: RUNNING a batch, SLEEPING between two batches, STOPPING when no further batch will start and the pipelines of the current one are still going, FINISHED or STOPPED
number - the number of that run within its view, 0 when there is none
batch - the 1-based batch the run is at or ended with, 0 when there is none
batches - how many batches the run has, or a run started now would have
finished - how many pipelines of the run came to an end, whatever the outcome
failed - how many of them ended failed or aborted
total - how many pipelines the run has, or a run started now would have
concurrentPipelines - how many pipelines a batch holds
sleepSeconds - the pause between the end of a batch and the start of the next
nextBatchAt - epoch milliseconds at which the next batch starts, while sleeping; null otherwise
startedAt - epoch milliseconds the run started at, or null
finishedAt - epoch milliseconds the run ended at, or null
estimatedEnd - epoch milliseconds at which the run going on is expected to end: what is left of the current batch, going by how long its pipelines took the last time, and for every batch to come its slowest pipeline and the sleep before it; null when no run is going or nothing is known of how long the pipelines take
estimatedDuration - milliseconds a run started now is expected to take, by the same reckoning, or null
startedBy - the display name of the user who started the run, or null
stoppedBy - the display name of the user who stopped the run, or null
jobs - the full names of the first jobs a run started now would build, which decide who may start one

@ExportedBean(defaultVisibility=100) public record Consolidated(String state, int number, int batch, int batches, int finished, int failed, int total, int concurrentPipelines, int sleepSeconds, Long nextBatchAt, Long startedAt, Long finishedAt, Long estimatedEnd, Long estimatedDuration, String startedBy, String stoppedBy, List<String> jobs) extends Record
What marks a component as the consolidated pipeline of its view, the parent that runs the view's pipelines a few at a time, and tells where its run stands. The component's one pipeline has a stage per batch and a task per pipeline of the view.
  • Field Details

  • Constructor Details

    • Consolidated

      public Consolidated(String state, int number, int batch, int batches, int finished, int failed, int total, int concurrentPipelines, int sleepSeconds, Long nextBatchAt, Long startedAt, Long finishedAt, Long estimatedEnd, Long estimatedDuration, String startedBy, String stoppedBy, List<String> jobs)
      Creates an instance of a Consolidated record class.
      Parameters:
      state - the value for the state record component
      number - the value for the number record component
      batch - the value for the batch record component
      batches - the value for the batches record component
      finished - the value for the finished record component
      failed - the value for the failed record component
      total - the value for the total record component
      concurrentPipelines - the value for the concurrentPipelines record component
      sleepSeconds - the value for the sleepSeconds record component
      nextBatchAt - the value for the nextBatchAt record component
      startedAt - the value for the startedAt record component
      finishedAt - the value for the finishedAt record component
      estimatedEnd - the value for the estimatedEnd record component
      estimatedDuration - the value for the estimatedDuration record component
      startedBy - the value for the startedBy record component
      stoppedBy - the value for the stoppedBy record component
      jobs - the value for the jobs record component
  • Method Details

    • active

      @Exported public boolean active()
      Whether a run is going on: no other can start, and this one can be stopped.
    • permitted

      @Exported public boolean permitted()
      Whether the current user may start and stop a run: there is a pipeline to run and the user may build the first job of every one. Computed while exporting, like Permissions, never cached.
    • mayBuildAll

      public static boolean mayBuildAll(List<String> jobFullNames)
      Whether the current user may build every one of the jobs; a job that is gone or hidden counts as a no.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • state

      @Exported public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • number

      @Exported public int number()
      Returns the value of the number record component.
      Returns:
      the value of the number record component
    • batch

      @Exported public int batch()
      Returns the value of the batch record component.
      Returns:
      the value of the batch record component
    • batches

      @Exported public int batches()
      Returns the value of the batches record component.
      Returns:
      the value of the batches record component
    • finished

      @Exported public int finished()
      Returns the value of the finished record component.
      Returns:
      the value of the finished record component
    • failed

      @Exported public int failed()
      Returns the value of the failed record component.
      Returns:
      the value of the failed record component
    • total

      @Exported public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • concurrentPipelines

      @Exported public int concurrentPipelines()
      Returns the value of the concurrentPipelines record component.
      Returns:
      the value of the concurrentPipelines record component
    • sleepSeconds

      @Exported public int sleepSeconds()
      Returns the value of the sleepSeconds record component.
      Returns:
      the value of the sleepSeconds record component
    • nextBatchAt

      @Exported public Long nextBatchAt()
      Returns the value of the nextBatchAt record component.
      Returns:
      the value of the nextBatchAt record component
    • startedAt

      @Exported public Long startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • finishedAt

      @Exported public Long finishedAt()
      Returns the value of the finishedAt record component.
      Returns:
      the value of the finishedAt record component
    • estimatedEnd

      @Exported public Long estimatedEnd()
      Returns the value of the estimatedEnd record component.
      Returns:
      the value of the estimatedEnd record component
    • estimatedDuration

      @Exported public Long estimatedDuration()
      Returns the value of the estimatedDuration record component.
      Returns:
      the value of the estimatedDuration record component
    • startedBy

      @Exported public String startedBy()
      Returns the value of the startedBy record component.
      Returns:
      the value of the startedBy record component
    • stoppedBy

      @Exported public String stoppedBy()
      Returns the value of the stoppedBy record component.
      Returns:
      the value of the stoppedBy record component
    • jobs

      public List<String> jobs()
      Returns the value of the jobs record component.
      Returns:
      the value of the jobs record component