Class BalancedProviderFuture

  • All Implemented Interfaces:
    AsyncResult

    public class BalancedProviderFuture
    extends ProviderFuture
    A more balanced implementation of a ProviderFuture that works better on some platforms such as windows where the thread park and atomic operations used by a more aggressive implementation could result in poor performance.
    • Constructor Detail

      • BalancedProviderFuture

        public BalancedProviderFuture()
    • Method Detail

      • sync

        public boolean sync​(long amount,
                            java.util.concurrent.TimeUnit unit)
                     throws ProviderException
        Description copied from class: ProviderFuture
        Timed wait for a response to a Provider operation.
        Specified by:
        sync in class ProviderFuture
        Parameters:
        amount - The amount of time to wait before abandoning the wait.
        unit - The unit to use for this wait period.
        Returns:
        true if the operation succeeded and false if the waiting time elapsed while waiting for the operation to complete.
        Throws:
        ProviderException - if an error occurs while waiting for the response.