![JAR search and dependency download from the Maven repository](/logo.png)
com.ibm.optim.oaas.client.job.JobExecutorBuilder.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-java-client Show documentation
Show all versions of api-java-client Show documentation
Java client API for DOCplexCloud, version 1.0.257
The newest version!
<span class="http"><span class="http"><span class="coffeescript">JobExecutorBuilder (Java Client <span class="hljs-keyword">for</span> DOcplexcloud <span class="hljs-number">1.0</span> API)</span></span></span>
com.ibm.optim.oaas.client.job
Interface JobExecutorBuilder
-
public interface JobExecutorBuilder
Builder used to configure a job executor.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
DEFAULT_INTERVAL
Default time interval used to check job status in milliseconds.
static int
DEFAULT_RETRY
Default maximum retry attempts on calls to servers, when applicable.
static int
DEFAULT_RETRY_DELAY
Default initial retry delay in milliseconds.
static int
DEFAULT_THREADS
Default number of threads.
static int
DEFAULT_TIMEOUT
Default timeout for the job monitoring.
-
Method Summary
Methods Modifier and Type Method and Description JobExecutor
build()
Returns the configure job executor.
JobExecutorBuilder
interval(long interval,
TimeUnit unit)
Sets the time interval used to check the job status.
JobExecutorBuilder
retry(int retry)
Sets maximum retry attempts on calls to servers, when applicable.
JobExecutorBuilder
retryDelay(long delay,
TimeUnit unit)
Sets the initial retry delay.
JobExecutorBuilder
service(ExecutorService service)
Sets the executor service used to manage threads and tasks within the job
executor.
JobExecutorBuilder
threads(int threads)
Sets the number of threads.
JobExecutorBuilder
timeout(long timeout,
TimeUnit unit)
Sets the timeout for the job monitoring in milliseconds.
-
-
Field Detail
-
DEFAULT_THREADS
static final int DEFAULT_THREADS
Default number of threads.
- See Also:
- Constant Field Values
-
DEFAULT_INTERVAL
static final int DEFAULT_INTERVAL
Default time interval used to check job status in milliseconds.
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT
static final int DEFAULT_TIMEOUT
Default timeout for the job monitoring. If the timeout is reached, an
interrupted exception will be thrown.
- See Also:
- Constant Field Values
-
DEFAULT_RETRY
static final int DEFAULT_RETRY
Default maximum retry attempts on calls to servers, when applicable.
- See Also:
- Constant Field Values
-
DEFAULT_RETRY_DELAY
static final int DEFAULT_RETRY_DELAY
Default initial retry delay in milliseconds.
- See Also:
- Constant Field Values
-
Method Detail
-
threads
JobExecutorBuilder threads(int threads)
Sets the number of threads.
- Parameters:
threads
- Number of threads.
- Returns:
- The builder.
-
interval
JobExecutorBuilder interval(long interval,
TimeUnit unit)
Sets the time interval used to check the job status.
- Parameters:
interval
- The time interval in milliseconds.unit
- The time unit.
- Returns:
- The builder.
-
timeout
JobExecutorBuilder timeout(long timeout,
TimeUnit unit)
Sets the timeout for the job monitoring in milliseconds. If the timeout is reached,
an interrupted exception will be thrown.
- Parameters:
timeout
- The timeout or -1 for no timeout.unit
- The time unit.
- Returns:
- The builder.
-
service
JobExecutorBuilder service(ExecutorService service)
Sets the executor service used to manage threads and tasks within the job
executor.
- Parameters:
service
- The executor service.
- Returns:
- The builder.
-
retry
JobExecutorBuilder retry(int retry)
Sets maximum retry attempts on calls to servers, when applicable.
- Parameters:
retry
- The maximum.
- Returns:
- The builder.
-
retryDelay
JobExecutorBuilder retryDelay(long delay,
TimeUnit unit)
Sets the initial retry delay. Retry delay is multiplied by 2 at each
retry of a given call.
- Parameters:
delay
- The delay.unit
- The time unit.
- Returns:
- The builder.
-
build
JobExecutor build()
Returns the configure job executor.
- Returns:
- The job executor.
Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.