Record Class RecentTab.Model

java.lang.Object
java.lang.Record
jenkins.model.dashboard.RecentTab.Model
Record Components:
queuedCount - the number of queued builds the user can see, which may exceed the entries shown
executors - the executor of each running build
Enclosing class:
RecentTab

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static record RecentTab.Model(List<RecentTab.Entry<Run<?,?>>> running, List<RecentTab.Entry<Queue.Item>> queued, int queuedCount, List<RecentTab.Entry<Run<?,?>>> finished, Map<Run<?,?>,Executor> executors) extends Record
The groups shown on the tab, each capped at RecentTab.LIMIT entries.
  • Constructor Details

    • Model

      public Model(List<RecentTab.Entry<Run<?,?>>> running, List<RecentTab.Entry<Queue.Item>> queued, int queuedCount, List<RecentTab.Entry<Run<?,?>>> finished, Map<Run<?,?>,Executor> executors)
      Creates an instance of a Model record class.
      Parameters:
      running - the value for the running record component
      queued - the value for the queued record component
      queuedCount - the value for the queuedCount record component
      finished - the value for the finished record component
      executors - the value for the executors record component
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • executorOf

      @CheckForNull public Executor executorOf(Run<?,?> run)
    • 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.
    • running

      public List<RecentTab.Entry<Run<?,?>>> running()
      Returns the value of the running record component.
      Returns:
      the value of the running record component
    • queued

      public List<RecentTab.Entry<Queue.Item>> queued()
      Returns the value of the queued record component.
      Returns:
      the value of the queued record component
    • queuedCount

      public int queuedCount()
      Returns the value of the queuedCount record component.
      Returns:
      the value of the queuedCount record component
    • finished

      public List<RecentTab.Entry<Run<?,?>>> finished()
      Returns the value of the finished record component.
      Returns:
      the value of the finished record component
    • executors

      public Map<Run<?,?>,Executor> executors()
      Returns the value of the executors record component.
      Returns:
      the value of the executors record component