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 aJobProgressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveThreadsrecord component.Returns the value of thecancelledSincerecord component.Returns the value of thedoneTimestamprecord component.final booleanIndicates whether some other object is "equal to" this one.interrors()Returns the value of theerrorsrecord component.eta()Returns the value of theetarecord component.Returns the value of theetaSecondsrecord component.etaText()Get a textual representation of the job's ETA.future()Returns the value of thefuturerecord component.final inthashCode()Returns a hash code value for this object.booleanisActive()Determines whether the job is active.booleanDetermines whether the job is complete.booleanDetermines whether the job was a success.Returns the value of thenextInputrecord component.Returns the value of thepausedSincerecord component.intReturns the value of thepercentDonerecord component.intReturns the value of theremainingInputsrecord component.intReturns the value of theskippedErrorsrecord component.intReturns the value of theskippedSuccessrecord component.Returns the value of thestartTimestamprecord component.state()Returns the value of thestaterecord component.intsuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalInputsrecord 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 aJobProgressrecord class.- Parameters:
state- the value for thestaterecord componentnextInput- the value for thenextInputrecord componenttotalInputs- the value for thetotalInputsrecord componentremainingInputs- the value for theremainingInputsrecord componentsuccess- the value for thesuccessrecord componentskippedSuccess- the value for theskippedSuccessrecord componenterrors- the value for theerrorsrecord componentskippedErrors- the value for theskippedErrorsrecord componentpercentDone- the value for thepercentDonerecord componentpausedSince- the value for thepausedSincerecord componentcancelledSince- the value for thecancelledSincerecord componentstartTimestamp- the value for thestartTimestamprecord componentdoneTimestamp- the value for thedoneTimestamprecord componenteta- the value for theetarecord componentetaSeconds- the value for theetaSecondsrecord componentactiveThreads- the value for theactiveThreadsrecord componentfuture- the value for thefuturerecord 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 thestaterecord component.- Returns:
- the value of the
staterecord component
-
nextInput
Returns the value of thenextInputrecord component.- Returns:
- the value of the
nextInputrecord component
-
totalInputs
public int totalInputs()Returns the value of thetotalInputsrecord component.- Returns:
- the value of the
totalInputsrecord component
-
remainingInputs
public int remainingInputs()Returns the value of theremainingInputsrecord component.- Returns:
- the value of the
remainingInputsrecord component
-
success
public int success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
skippedSuccess
public int skippedSuccess()Returns the value of theskippedSuccessrecord component.- Returns:
- the value of the
skippedSuccessrecord component
-
errors
public int errors()Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-
skippedErrors
public int skippedErrors()Returns the value of theskippedErrorsrecord component.- Returns:
- the value of the
skippedErrorsrecord component
-
percentDone
public int percentDone()Returns the value of thepercentDonerecord component.- Returns:
- the value of the
percentDonerecord component
-
pausedSince
Returns the value of thepausedSincerecord component.- Returns:
- the value of the
pausedSincerecord component
-
cancelledSince
Returns the value of thecancelledSincerecord component.- Returns:
- the value of the
cancelledSincerecord component
-
startTimestamp
Returns the value of thestartTimestamprecord component.- Returns:
- the value of the
startTimestamprecord component
-
doneTimestamp
Returns the value of thedoneTimestamprecord component.- Returns:
- the value of the
doneTimestamprecord component
-
eta
Returns the value of theetarecord component.- Returns:
- the value of the
etarecord component
-
etaSeconds
Returns the value of theetaSecondsrecord component.- Returns:
- the value of the
etaSecondsrecord component
-
activeThreads
public int activeThreads()Returns the value of theactiveThreadsrecord component.- Returns:
- the value of the
activeThreadsrecord component
-
future
Returns the value of thefuturerecord component.- Returns:
- the value of the
futurerecord component
-