Interface LimitAlgorithm.Result<T>
- Type Parameters:
T- type returned by theCallable
- 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 Summary
Modifier and TypeMethodDescriptionstatic <T> LimitAlgorithm.Result<T> create(T callableReturnValue, LimitAlgorithm.Outcome outcome) Creates a newResultcombining the return value from theCallableand the limit algorithmLimitAlgorithm.Outcome.outcome()LimitAlgorithm.Outcomeof the limit algorithm.result()Value returned from theCallablecomputation.
-
Method Details
-
create
Creates a newResultcombining the return value from theCallableand the limit algorithmLimitAlgorithm.Outcome.- Type Parameters:
T- type of the return value from theCallable- Parameters:
callableReturnValue- value returned from theCallableoutcome- limit algorithm outcome- Returns:
- new
Resultcombining the return value and the outcome
-
result
T result()Value returned from theCallablecomputation.- Returns:
- callable result
-
outcome
LimitAlgorithm.Outcome outcome()LimitAlgorithm.Outcomeof the limit algorithm.- Returns:
- outcome
-