public interface JobExecutorBuilder
| 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.
|
| 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.
|
static final int DEFAULT_THREADS
static final int DEFAULT_INTERVAL
static final int DEFAULT_TIMEOUT
static final int DEFAULT_RETRY
static final int DEFAULT_RETRY_DELAY
JobExecutorBuilder threads(int threads)
threads - Number of threads.JobExecutorBuilder interval(long interval, TimeUnit unit)
interval - The time interval in milliseconds.unit - The time unit.JobExecutorBuilder timeout(long timeout, TimeUnit unit)
timeout - The timeout or -1 for no timeout.unit - The time unit.JobExecutorBuilder service(ExecutorService service)
service - The executor service.JobExecutorBuilder retry(int retry)
retry - The maximum.JobExecutorBuilder retryDelay(long delay, TimeUnit unit)
delay - The delay.unit - The time unit.JobExecutor build()
Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.