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 aExecutionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastExecutionTimerecord component.Returns the value of thepreviousValuerecord component.longReturns the value of therunNumberrecord component.longReturns the value of thethisExecutionTimerecord component.final StringtoString()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 aExecutionInforecord class.- Parameters:
previousValue- the value for thepreviousValuerecord componentrunNumber- the value for therunNumberrecord componentlastExecutionTime- the value for thelastExecutionTimerecord componentthisExecutionTime- the value for thethisExecutionTimerecord 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 thepreviousValuerecord component.- Returns:
- the value of the
previousValuerecord component
-
runNumber
public long runNumber()Returns the value of therunNumberrecord component.- Returns:
- the value of the
runNumberrecord component
-
lastExecutionTime
public long lastExecutionTime()Returns the value of thelastExecutionTimerecord component.- Returns:
- the value of the
lastExecutionTimerecord component
-
thisExecutionTime
public long thisExecutionTime()Returns the value of thethisExecutionTimerecord component.- Returns:
- the value of the
thisExecutionTimerecord component
-