Interface IEvalCompletableFutureStrategy<T,E extends org.eclipse.core.runtime.CoreException>

Type Parameters:
T - Generic type of CompletableFuture.
E - Type of custom exception if an error occured in evalCompletableFutureGet method.
All Known Subinterfaces:
INonCancelableEvalCompletableFutureStrategy<T,E>
All Known Implementing Classes:
AbstractWaitingWithInfiniteProgressDialog, WaitForDebugProcessesTerminationStrategy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IEvalCompletableFutureStrategy<T,E extends org.eclipse.core.runtime.CoreException>
Strategy for waiting of and getting result of CompletableFuture.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    This constant can be passed as timeout argument in evalCompletableFutureGet if there is no time limit on CompletableFuture result waiting.
  • Method Summary

    Modifier and Type
    Method
    Description
    evalCompletableFutureGet(CompletableFuture<T> completableFuture, long timeout, TimeUnit timeUnit)
    Evaluate one of the CompletableFuture::get methods with any additional actions that need to be performed before and after.
  • Field Details

    • INFINITE_TIMEOUT

      static final long INFINITE_TIMEOUT
      This constant can be passed as timeout argument in evalCompletableFutureGet if there is no time limit on CompletableFuture result waiting.
      See Also:
  • Method Details

    • evalCompletableFutureGet

      T evalCompletableFutureGet(CompletableFuture<T> completableFuture, long timeout, TimeUnit timeUnit) throws E, TimeoutException, org.eclipse.core.runtime.OperationCanceledException
      Evaluate one of the CompletableFuture::get methods with any additional actions that need to be performed before and after.
      Parameters:
      completableFuture - Future which result is need, must not be null.
      timeout - Future result wait timeout. Must be greater or equal 0 or INFINITE_TIMEOUT.
      timeUnit - Units of timeout, can be null if timeout is equal INFINITE_TIMEOUT.
      Returns:
      result of Completable Future, can be null.
      Throws:
      TimeoutException - if there was waiting timeout.
      org.eclipse.core.runtime.OperationCanceledException - if user cancels operation (where applicable).
      E extends org.eclipse.core.runtime.CoreException