Record Class Tile

java.lang.Object
java.lang.Record
io.jenkins.plugins.livewall.Tile
Record Components:
label - the text drawn on the tile, after any name rewriting
fullName - the job's full name, used for the tooltip and for diffing between refreshes
url - the job's URL relative to the Jenkins root
status - last known outcome, independent of whether a build is running
building - whether a build is in progress
queued - whether the job is waiting in the build queue
buildNumber - number of the most recent build, or 0 if the job has never built
startedAt - epoch millis at which the running build started, or 0 when not building
estimatedDuration - expected duration of the running build in millis, or -1 when unknown
completedAt - epoch millis of the most recent completed build, or 0 if there is none

public record Tile(String label, String fullName, String url, JobStatus status, boolean building, boolean queued, int buildNumber, long startedAt, long estimatedDuration, long completedAt) extends Record
One job, reduced to everything the wall needs and nothing else.

Timing is sent raw rather than pre-rendered: the browser interpolates the progress of a running build between polls, so a five second refresh still produces a smoothly advancing bar.

  • Constructor Details

    • Tile

      public Tile(@NonNull String label, @NonNull String fullName, @NonNull String url, @NonNull JobStatus status, boolean building, boolean queued, int buildNumber, long startedAt, long estimatedDuration, long completedAt)
      Creates an instance of a Tile record class.
      Parameters:
      label - the value for the label record component
      fullName - the value for the fullName record component
      url - the value for the url record component
      status - the value for the status record component
      building - the value for the building record component
      queued - the value for the queued record component
      buildNumber - the value for the buildNumber record component
      startedAt - the value for the startedAt record component
      estimatedDuration - the value for the estimatedDuration record component
      completedAt - the value for the completedAt record component
  • Method Details

    • 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.
    • label

      @NonNull public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • fullName

      @NonNull public String fullName()
      Returns the value of the fullName record component.
      Returns:
      the value of the fullName record component
    • url

      @NonNull public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • status

      @NonNull public JobStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • building

      public boolean building()
      Returns the value of the building record component.
      Returns:
      the value of the building record component
    • queued

      public boolean queued()
      Returns the value of the queued record component.
      Returns:
      the value of the queued record component
    • buildNumber

      public int buildNumber()
      Returns the value of the buildNumber record component.
      Returns:
      the value of the buildNumber record component
    • startedAt

      public long startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • estimatedDuration

      public long estimatedDuration()
      Returns the value of the estimatedDuration record component.
      Returns:
      the value of the estimatedDuration record component
    • completedAt

      public long completedAt()
      Returns the value of the completedAt record component.
      Returns:
      the value of the completedAt record component