Package de.uni_kiel.rz.fdr.repl
Record Class REPLJob.JobProgress
java.lang.Object
java.lang.Record
de.uni_kiel.rz.fdr.repl.REPLJob.JobProgress
- Record Components:
state
- The job's statenextInput
- Index of the next input that we would enqueue for processingtotalInputs
- Number of total inputs that the job was started withremainingInputs
- Number of inputs that have not yet been processedsuccess
- Number of inputs that were successfully processed (excluding skipped successful inputs when resuming)skippedSuccess
- Number of inputs that were skipped when resuming a job because they were successful during an earlier runerrors
- Number of inputs that raised an exception during processing (excluding skipped errors when resuming)skippedErrors
- Number of inputs that were skipped when resuming a job because they were not successful during an earlier runpercentDone
- Current progress of the jobpausedSince
- If currently paused: since when?cancelledSince
- If cancelled: since when?startTimestamp
- If started: since when?doneTimestamp
- If done (successfully or not): since when?eta
- Estimated time of completionetaSeconds
- Number of remaining seconds until estimated time of completionactiveThreads
- Number of active worker threads processing inputsfuture
- A future for this job, so you can wait for its completion
- Enclosing class:
- REPLJob
public static record REPLJob.JobProgress(REPLJob.JobState state, Integer nextInput, int totalInputs, int remainingInputs, int success, int skippedSuccess, int errors, int skippedErrors, int percentDone, ZonedDateTime pausedSince, ZonedDateTime cancelledSince, ZonedDateTime startTimestamp, ZonedDateTime doneTimestamp, ZonedDateTime eta, Long etaSeconds, int activeThreads, Future<REPLJob.JobProgress> future)
extends Record
A record that summarizes a job's state at one instant in time.
-
Constructor Summary
ConstructorsConstructorDescriptionJobProgress
(REPLJob.JobState state, Integer nextInput, int totalInputs, int remainingInputs, int success, int skippedSuccess, int errors, int skippedErrors, int percentDone, ZonedDateTime pausedSince, ZonedDateTime cancelledSince, ZonedDateTime startTimestamp, ZonedDateTime doneTimestamp, ZonedDateTime eta, Long etaSeconds, int activeThreads, Future<REPLJob.JobProgress> future) Creates an instance of aJobProgress
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theactiveThreads
record component.Returns the value of thecancelledSince
record component.Returns the value of thedoneTimestamp
record component.final boolean
Indicates whether some other object is "equal to" this one.int
errors()
Returns the value of theerrors
record component.eta()
Returns the value of theeta
record component.Returns the value of theetaSeconds
record component.etaText()
Get a textual representation of the job's ETA.future()
Returns the value of thefuture
record component.final int
hashCode()
Returns a hash code value for this object.boolean
isActive()
Determines whether the job is active.boolean
Determines whether the job is complete.boolean
Determines whether the job was a success.Returns the value of thenextInput
record component.Returns the value of thepausedSince
record component.int
Returns the value of thepercentDone
record component.int
Returns the value of theremainingInputs
record component.int
Returns the value of theskippedErrors
record component.int
Returns the value of theskippedSuccess
record component.Returns the value of thestartTimestamp
record component.state()
Returns the value of thestate
record component.int
success()
Returns the value of thesuccess
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetotalInputs
record component.
-
Constructor Details
-
JobProgress
public JobProgress(REPLJob.JobState state, Integer nextInput, int totalInputs, int remainingInputs, int success, int skippedSuccess, int errors, int skippedErrors, int percentDone, ZonedDateTime pausedSince, ZonedDateTime cancelledSince, ZonedDateTime startTimestamp, ZonedDateTime doneTimestamp, ZonedDateTime eta, Long etaSeconds, int activeThreads, Future<REPLJob.JobProgress> future) Creates an instance of aJobProgress
record class.- Parameters:
state
- the value for thestate
record componentnextInput
- the value for thenextInput
record componenttotalInputs
- the value for thetotalInputs
record componentremainingInputs
- the value for theremainingInputs
record componentsuccess
- the value for thesuccess
record componentskippedSuccess
- the value for theskippedSuccess
record componenterrors
- the value for theerrors
record componentskippedErrors
- the value for theskippedErrors
record componentpercentDone
- the value for thepercentDone
record componentpausedSince
- the value for thepausedSince
record componentcancelledSince
- the value for thecancelledSince
record componentstartTimestamp
- the value for thestartTimestamp
record componentdoneTimestamp
- the value for thedoneTimestamp
record componenteta
- the value for theeta
record componentetaSeconds
- the value for theetaSeconds
record componentactiveThreads
- the value for theactiveThreads
record componentfuture
- the value for thefuture
record component
-
-
Method Details
-
isActive
public boolean isActive()Determines whether the job is active. A job ist active after it has been started and may still produce further output in the future.- Returns:
- The job's active status
-
isComplete
public boolean isComplete()Determines whether the job is complete. A job is complete if all its inputs have been processed or skipped (either successfully or unsuccessfully)- Returns:
- The job's completion status
-
isSuccess
public boolean isSuccess()Determines whether the job was a success. A job is a success if there all inputs were successfully processed (during this or resumed previous runs)- Returns:
- The job's success status
-
etaText
Get a textual representation of the job's ETA.- Returns:
- A textual representation of the job's ETA
-
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 thestate
record component.- Returns:
- the value of the
state
record component
-
nextInput
Returns the value of thenextInput
record component.- Returns:
- the value of the
nextInput
record component
-
totalInputs
public int totalInputs()Returns the value of thetotalInputs
record component.- Returns:
- the value of the
totalInputs
record component
-
remainingInputs
public int remainingInputs()Returns the value of theremainingInputs
record component.- Returns:
- the value of the
remainingInputs
record component
-
success
public int success()Returns the value of thesuccess
record component.- Returns:
- the value of the
success
record component
-
skippedSuccess
public int skippedSuccess()Returns the value of theskippedSuccess
record component.- Returns:
- the value of the
skippedSuccess
record component
-
errors
public int errors()Returns the value of theerrors
record component.- Returns:
- the value of the
errors
record component
-
skippedErrors
public int skippedErrors()Returns the value of theskippedErrors
record component.- Returns:
- the value of the
skippedErrors
record component
-
percentDone
public int percentDone()Returns the value of thepercentDone
record component.- Returns:
- the value of the
percentDone
record component
-
pausedSince
Returns the value of thepausedSince
record component.- Returns:
- the value of the
pausedSince
record component
-
cancelledSince
Returns the value of thecancelledSince
record component.- Returns:
- the value of the
cancelledSince
record component
-
startTimestamp
Returns the value of thestartTimestamp
record component.- Returns:
- the value of the
startTimestamp
record component
-
doneTimestamp
Returns the value of thedoneTimestamp
record component.- Returns:
- the value of the
doneTimestamp
record component
-
eta
Returns the value of theeta
record component.- Returns:
- the value of the
eta
record component
-
etaSeconds
Returns the value of theetaSeconds
record component.- Returns:
- the value of the
etaSeconds
record component
-
activeThreads
public int activeThreads()Returns the value of theactiveThreads
record component.- Returns:
- the value of the
activeThreads
record component
-
future
Returns the value of thefuture
record component.- Returns:
- the value of the
future
record component
-