Class JobCheckOptions
java.lang.Object
org.mineskin.JobCheckOptions
- All Implemented Interfaces:
IJobCheckOptions
Example:
JobCheckOptions.create()
.withUseEta()
.withInterval(RequestInterval.exponential())
.withMaxAttempts(50)
-
Constructor Summary
ConstructorsConstructorDescriptionJobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts) Deprecated.JobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts, boolean useEta) Deprecated.JobCheckOptions(ScheduledExecutorService scheduler, RequestInterval interval, int initialDelayMillis, int maxAttempts, boolean useEta) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic JobCheckOptionscreate()Creates a JobCheckOptions instance with default values.static JobCheckOptionscreate(ScheduledExecutorService scheduler) Creates a JobCheckOptions instance with default values.intinterval()intDeprecated.intbooleanuseEta()withInitialDelay(int initialDelayMillis) withInitialDelay(int initialDelay, TimeUnit unit) withInterval(RequestInterval interval) withMaxAttempts(int maxAttempts) Sets the option to use the estimated completion time provided by the server to schedule the first check.
-
Constructor Details
-
JobCheckOptions
@Deprecated public JobCheckOptions(ScheduledExecutorService scheduler, RequestInterval interval, int initialDelayMillis, int maxAttempts, boolean useEta) Deprecated.- Parameters:
scheduler- Executor service to run the job checks - this should be a single-threaded schedulerinterval- Interval strategy between each request, seeRequestIntervalinitialDelayMillis- Initial delay in milliseconds before the first job check, default is 2000maxAttempts- Maximum number of attempts to check the job status, default is 10useEta- Whether to use the estimated completion time provided by the server to schedule the first check, default is false
-
JobCheckOptions
@Deprecated public JobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts, boolean useEta) Deprecated.- Parameters:
scheduler- Executor service to run the job checks - this should be a single-threaded schedulerintervalMillis- 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 10useEta- Whether to use the estimated completion time provided by the server to schedule the first check, default is false
-
JobCheckOptions
@Deprecated public JobCheckOptions(ScheduledExecutorService scheduler, int intervalMillis, int initialDelayMillis, int maxAttempts) Deprecated.
-
-
Method Details
-
create
Creates a JobCheckOptions instance with default values. -
create
Creates a JobCheckOptions instance with default values. -
withInterval
-
withInitialDelay
-
withInitialDelay
-
withMaxAttempts
-
withUseEta
Sets the option to use the estimated completion time provided by the server to schedule the first check. -
scheduler
- Specified by:
schedulerin interfaceIJobCheckOptions
-
interval
- Specified by:
intervalin interfaceIJobCheckOptions
-
intervalMillis
Deprecated.- Specified by:
intervalMillisin interfaceIJobCheckOptions
-
initialDelayMillis
public int initialDelayMillis()- Specified by:
initialDelayMillisin interfaceIJobCheckOptions
-
maxAttempts
public int maxAttempts()- Specified by:
maxAttemptsin interfaceIJobCheckOptions
-
useEta
public boolean useEta()- Specified by:
useEtain interfaceIJobCheckOptions
-