Class ForwardingCheckedFuture<V,​X extends java.lang.Exception>

    • Constructor Detail

      • ForwardingCheckedFuture

        public ForwardingCheckedFuture()
    • Method Detail

      • checkedGet

        public V checkedGet()
                     throws X extends java.lang.Exception
        Description copied from interface: CheckedFuture
        Exception checking version of Future.get() that will translate InterruptedException, CancellationException and ExecutionException into application-specific exceptions.
        Specified by:
        checkedGet in interface CheckedFuture<V,​X extends java.lang.Exception>
        Returns:
        the result of executing the future.
        Throws:
        X - on interruption, cancellation or execution exceptions.
        X extends java.lang.Exception
      • checkedGet

        public V checkedGet​(long timeout,
                            java.util.concurrent.TimeUnit unit)
                     throws java.util.concurrent.TimeoutException,
                            X extends java.lang.Exception
        Description copied from interface: CheckedFuture
        Exception checking version of Future.get(long, TimeUnit) that will translate InterruptedException, CancellationException and ExecutionException into application-specific exceptions. On timeout this method throws a normal TimeoutException.
        Specified by:
        checkedGet in interface CheckedFuture<V,​X extends java.lang.Exception>
        Returns:
        the result of executing the future.
        Throws:
        java.util.concurrent.TimeoutException - if retrieving the result timed out.
        X - on interruption, cancellation or execution exceptions.
        X extends java.lang.Exception