Package se.diabol.jenkins.pipeline.model
Record Class Consolidated
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Consolidated
- Record Components:
state-IDLEwhen the view never ran its pipelines, otherwise the state of the run going on or of the last one:RUNNINGa batch,SLEEPINGbetween two batches,STOPPINGwhen no further batch will start and the pipelines of the current one are still going,FINISHEDorSTOPPEDnumber- the number of that run within its view, 0 when there is nonebatch- the 1-based batch the run is at or ended with, 0 when there is nonebatches- how many batches the run has, or a run started now would havefinished- how many pipelines of the run came to an end, whatever the outcomefailed- how many of them ended failed or abortedtotal- how many pipelines the run has, or a run started now would haveconcurrentPipelines- how many pipelines a batch holdssleepSeconds- the pause between the end of a batch and the start of the nextnextBatchAt- epoch milliseconds at which the next batch starts, while sleeping; null otherwisestartedAt- epoch milliseconds the run started at, or nullfinishedAt- epoch milliseconds the run ended at, or nullestimatedEnd- 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 takeestimatedDuration- milliseconds a run started now is expected to take, by the same reckoning, or nullstartedBy- the display name of the user who started the run, or nullstoppedBy- the display name of the user who stopped the run, or nulljobs- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsolidated(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 aConsolidatedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Whether a run is going on: no other can start, and this one can be stopped.intbatch()Returns the value of thebatchrecord component.intbatches()Returns the value of thebatchesrecord component.intReturns the value of theconcurrentPipelinesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theestimatedDurationrecord component.Returns the value of theestimatedEndrecord component.intfailed()Returns the value of thefailedrecord component.intfinished()Returns the value of thefinishedrecord component.Returns the value of thefinishedAtrecord component.final inthashCode()Returns a hash code value for this object.jobs()Returns the value of thejobsrecord component.static booleanmayBuildAll(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.Returns the value of thenextBatchAtrecord component.intnumber()Returns the value of thenumberrecord component.booleanWhether 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.intReturns the value of thesleepSecondsrecord component.Returns the value of thestartedAtrecord component.Returns the value of thestartedByrecord component.state()Returns the value of thestaterecord component.Returns the value of thestoppedByrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Field Details
-
IDLE
- See Also:
-
RUNNING
- See Also:
-
SLEEPING
- See Also:
-
STOPPING
- See Also:
-
FINISHED
- See Also:
-
STOPPED
- See Also:
-
-
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 aConsolidatedrecord class.- Parameters:
state- the value for thestaterecord componentnumber- the value for thenumberrecord componentbatch- the value for thebatchrecord componentbatches- the value for thebatchesrecord componentfinished- the value for thefinishedrecord componentfailed- the value for thefailedrecord componenttotal- the value for thetotalrecord componentconcurrentPipelines- the value for theconcurrentPipelinesrecord componentsleepSeconds- the value for thesleepSecondsrecord componentnextBatchAt- the value for thenextBatchAtrecord componentstartedAt- the value for thestartedAtrecord componentfinishedAt- the value for thefinishedAtrecord componentestimatedEnd- the value for theestimatedEndrecord componentestimatedDuration- the value for theestimatedDurationrecord componentstartedBy- the value for thestartedByrecord componentstoppedBy- the value for thestoppedByrecord componentjobs- the value for thejobsrecord 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, likePermissions, never cached. -
mayBuildAll
Whether the current user may build every one of the jobs; a job that is gone or hidden counts as a no. -
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 '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
number
@Exported public int number()Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
batch
@Exported public int batch()Returns the value of thebatchrecord component.- Returns:
- the value of the
batchrecord component
-
batches
@Exported public int batches()Returns the value of thebatchesrecord component.- Returns:
- the value of the
batchesrecord component
-
finished
@Exported public int finished()Returns the value of thefinishedrecord component.- Returns:
- the value of the
finishedrecord component
-
failed
@Exported public int failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
total
@Exported public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
concurrentPipelines
@Exported public int concurrentPipelines()Returns the value of theconcurrentPipelinesrecord component.- Returns:
- the value of the
concurrentPipelinesrecord component
-
sleepSeconds
@Exported public int sleepSeconds()Returns the value of thesleepSecondsrecord component.- Returns:
- the value of the
sleepSecondsrecord component
-
nextBatchAt
Returns the value of thenextBatchAtrecord component.- Returns:
- the value of the
nextBatchAtrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
finishedAt
Returns the value of thefinishedAtrecord component.- Returns:
- the value of the
finishedAtrecord component
-
estimatedEnd
Returns the value of theestimatedEndrecord component.- Returns:
- the value of the
estimatedEndrecord component
-
estimatedDuration
Returns the value of theestimatedDurationrecord component.- Returns:
- the value of the
estimatedDurationrecord component
-
startedBy
Returns the value of thestartedByrecord component.- Returns:
- the value of the
startedByrecord component
-
stoppedBy
Returns the value of thestoppedByrecord component.- Returns:
- the value of the
stoppedByrecord component
-
jobs
Returns the value of thejobsrecord component.- Returns:
- the value of the
jobsrecord component
-