Interface LimitAlgorithm.Result<T>

Type Parameters:
T - type returned by the Callable
Enclosing interface:
LimitAlgorithm

public static interface LimitAlgorithm.Result<T>
Carrier for both the result of a Callable subjected to concurrency limits and the corresponding LimitAlgorithm.Outcome.
  • Method Details

    • create

      static <T> LimitAlgorithm.Result<T> create(T callableReturnValue, LimitAlgorithm.Outcome outcome)
      Creates a new Result combining the return value from the Callable and the limit algorithm LimitAlgorithm.Outcome.
      Type Parameters:
      T - type of the return value from the Callable
      Parameters:
      callableReturnValue - value returned from the Callable
      outcome - limit algorithm outcome
      Returns:
      new Result combining the return value and the outcome
    • result

      T result()
      Value returned from the Callable computation.
      Returns:
      callable result
    • outcome

      LimitAlgorithm.Outcome of the limit algorithm.
      Returns:
      outcome