Record Class JobCheckOptions
java.lang.Object
java.lang.Record
org.mineskin.JobCheckOptions
- Record Components:
scheduler- Executor service to run the job checksintervalMillis- Interval in milliseconds between each job check, default is 1000initialDelayMillis- Initial delay in milliseconds before the first job check, default is 2000maxAttempts- Maximum number of attempts to check the job status, default is 10
public record JobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionJobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts) Creates an instance of aJobCheckOptionsrecord 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.intReturns the value of theinitialDelayMillisrecord component.intReturns the value of theintervalMillisrecord component.intReturns the value of themaxAttemptsrecord component.Returns the value of theschedulerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JobCheckOptions
public JobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts) Creates an instance of aJobCheckOptionsrecord class.- Parameters:
scheduler- the value for theschedulerrecord componentintervalMillis- the value for theintervalMillisrecord componentinitialDelayMillis- the value for theinitialDelayMillisrecord componentmaxAttempts- the value for themaxAttemptsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
scheduler
-
intervalMillis
public int intervalMillis()Returns the value of theintervalMillisrecord component.- Returns:
- the value of the
intervalMillisrecord component
-
initialDelayMillis
public int initialDelayMillis()Returns the value of theinitialDelayMillisrecord component.- Returns:
- the value of the
initialDelayMillisrecord component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-