All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.optim.oaas.client.job.JobExecutorBuilder.html Maven / Gradle / Ivy

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 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 © 20152017 IBM Corporation. Licensed under the Apache License, Version 2.0.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy