Record Class REPLJob.JobProgress

java.lang.Object
java.lang.Record
de.uni_kiel.rz.fdr.repl.REPLJob.JobProgress
Record Components:
state - The job's state
nextInput - Index of the next input that we would enqueue for processing
totalInputs - Number of total inputs that the job was started with
remainingInputs - Number of inputs that have not yet been processed
success - 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 run
errors - 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 run
percentDone - Current progress of the job
pausedSince - 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 completion
etaSeconds - Number of remaining seconds until estimated time of completion
activeThreads - Number of active worker threads processing inputs
future - 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 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 a JobProgress record class.
      Parameters:
      state - the value for the state record component
      nextInput - the value for the nextInput record component
      totalInputs - the value for the totalInputs record component
      remainingInputs - the value for the remainingInputs record component
      success - the value for the success record component
      skippedSuccess - the value for the skippedSuccess record component
      errors - the value for the errors record component
      skippedErrors - the value for the skippedErrors record component
      percentDone - the value for the percentDone record component
      pausedSince - the value for the pausedSince record component
      cancelledSince - the value for the cancelledSince record component
      startTimestamp - the value for the startTimestamp record component
      doneTimestamp - the value for the doneTimestamp record component
      eta - the value for the eta record component
      etaSeconds - the value for the etaSeconds record component
      activeThreads - the value for the activeThreads record component
      future - the value for the future 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

      public String etaText()
      Get a textual representation of the job's ETA.
      Returns:
      A textual representation of the job's ETA
    • 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.
    • state

      public REPLJob.JobState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • nextInput

      public Integer nextInput()
      Returns the value of the nextInput record component.
      Returns:
      the value of the nextInput record component
    • totalInputs

      public int totalInputs()
      Returns the value of the totalInputs record component.
      Returns:
      the value of the totalInputs record component
    • remainingInputs

      public int remainingInputs()
      Returns the value of the remainingInputs record component.
      Returns:
      the value of the remainingInputs record component
    • success

      public int success()
      Returns the value of the success record component.
      Returns:
      the value of the success record component
    • skippedSuccess

      public int skippedSuccess()
      Returns the value of the skippedSuccess record component.
      Returns:
      the value of the skippedSuccess record component
    • errors

      public int errors()
      Returns the value of the errors record component.
      Returns:
      the value of the errors record component
    • skippedErrors

      public int skippedErrors()
      Returns the value of the skippedErrors record component.
      Returns:
      the value of the skippedErrors record component
    • percentDone

      public int percentDone()
      Returns the value of the percentDone record component.
      Returns:
      the value of the percentDone record component
    • pausedSince

      public ZonedDateTime pausedSince()
      Returns the value of the pausedSince record component.
      Returns:
      the value of the pausedSince record component
    • cancelledSince

      public ZonedDateTime cancelledSince()
      Returns the value of the cancelledSince record component.
      Returns:
      the value of the cancelledSince record component
    • startTimestamp

      public ZonedDateTime startTimestamp()
      Returns the value of the startTimestamp record component.
      Returns:
      the value of the startTimestamp record component
    • doneTimestamp

      public ZonedDateTime doneTimestamp()
      Returns the value of the doneTimestamp record component.
      Returns:
      the value of the doneTimestamp record component
    • eta

      public ZonedDateTime eta()
      Returns the value of the eta record component.
      Returns:
      the value of the eta record component
    • etaSeconds

      public Long etaSeconds()
      Returns the value of the etaSeconds record component.
      Returns:
      the value of the etaSeconds record component
    • activeThreads

      public int activeThreads()
      Returns the value of the activeThreads record component.
      Returns:
      the value of the activeThreads record component
    • future

      public Future<REPLJob.JobProgress> future()
      Returns the value of the future record component.
      Returns:
      the value of the future record component