Record Class ExecutionInfo<T>
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.api.task.ExecutionInfo<T>
- Record Components:
previousValue
- value of previous execution or null if first execution or execution ended with exceptionrunNumber
- number of current runlastExecutionTime
- time in milliseconds of last execution or null if first executionthisExecutionTime
- time in millisecond when this execution should start
public record ExecutionInfo<T>(T previousValue, long runNumber, long lastExecutionTime, long thisExecutionTime)
extends Record
Info about last execution and current execution.
-
Constructor Summary
ConstructorsConstructorDescriptionExecutionInfo
(T previousValue, long runNumber, long lastExecutionTime, long thisExecutionTime) Creates an instance of aExecutionInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
Returns the value of thelastExecutionTime
record component.Returns the value of thepreviousValue
record component.long
Returns the value of therunNumber
record component.long
Returns the value of thethisExecutionTime
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ExecutionInfo
public ExecutionInfo(T previousValue, long runNumber, long lastExecutionTime, long thisExecutionTime) Creates an instance of aExecutionInfo
record class.- Parameters:
previousValue
- the value for thepreviousValue
record componentrunNumber
- the value for therunNumber
record componentlastExecutionTime
- the value for thelastExecutionTime
record componentthisExecutionTime
- the value for thethisExecutionTime
record 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 '=='. -
previousValue
Returns the value of thepreviousValue
record component.- Returns:
- the value of the
previousValue
record component
-
runNumber
public long runNumber()Returns the value of therunNumber
record component.- Returns:
- the value of the
runNumber
record component
-
lastExecutionTime
public long lastExecutionTime()Returns the value of thelastExecutionTime
record component.- Returns:
- the value of the
lastExecutionTime
record component
-
thisExecutionTime
public long thisExecutionTime()Returns the value of thethisExecutionTime
record component.- Returns:
- the value of the
thisExecutionTime
record component
-