Package io.jenkins.plugins.livewall
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 rewritingfullName- the job's full name, used for the tooltip and for diffing between refreshesurl- the job's URL relative to the Jenkins rootstatus- last known outcome, independent of whether a build is runningbuilding- whether a build is in progressqueued- whether the job is waiting in the build queuebuildNumber- number of the most recent build, or 0 if the job has never builtstartedAt- epoch millis at which the running build started, or 0 when not buildingestimatedDuration- expected duration of the running build in millis, or -1 when unknowncompletedAt- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuilding()Returns the value of thebuildingrecord component.intReturns the value of thebuildNumberrecord component.longReturns the value of thecompletedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theestimatedDurationrecord component.fullName()Returns the value of thefullNamerecord component.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.booleanqueued()Returns the value of thequeuedrecord component.longReturns the value of thestartedAtrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
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 aTilerecord class.- Parameters:
label- the value for thelabelrecord componentfullName- the value for thefullNamerecord componenturl- the value for theurlrecord componentstatus- the value for thestatusrecord componentbuilding- the value for thebuildingrecord componentqueued- the value for thequeuedrecord componentbuildNumber- the value for thebuildNumberrecord componentstartedAt- the value for thestartedAtrecord componentestimatedDuration- the value for theestimatedDurationrecord componentcompletedAt- the value for thecompletedAtrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
fullName
Returns the value of thefullNamerecord component.- Returns:
- the value of the
fullNamerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
building
public boolean building()Returns the value of thebuildingrecord component.- Returns:
- the value of the
buildingrecord component
-
queued
public boolean queued()Returns the value of thequeuedrecord component.- Returns:
- the value of the
queuedrecord component
-
buildNumber
public int buildNumber()Returns the value of thebuildNumberrecord component.- Returns:
- the value of the
buildNumberrecord component
-
startedAt
public long startedAt()Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
estimatedDuration
public long estimatedDuration()Returns the value of theestimatedDurationrecord component.- Returns:
- the value of the
estimatedDurationrecord component
-
completedAt
public long completedAt()Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-