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 newResult
combining the return value from theCallable
and the limit algorithmLimitAlgorithm.Outcome
.outcome()
LimitAlgorithm.Outcome
of the limit algorithm.result()
Value returned from theCallable
computation.
-
Method Details
-
create
Creates a newResult
combining the return value from theCallable
and the limit algorithmLimitAlgorithm.Outcome
.- Type Parameters:
T
- type of the return value from theCallable
- Parameters:
callableReturnValue
- value returned from theCallable
outcome
- limit algorithm outcome- Returns:
- new
Result
combining the return value and the outcome
-
result
T result()Value returned from theCallable
computation.- Returns:
- callable result
-
outcome
LimitAlgorithm.Outcome outcome()LimitAlgorithm.Outcome
of the limit algorithm.- Returns:
- outcome
-