public interface RunService extends Service
MAX_CONCURRENCY_LEVEL, MAX_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
<T> T |
run(ResilientAction<T> action)
Performs a
ResilientAction that will be run synchronously on the calling
thread. |
getActionMetrics, getCircuitBreaker, shutdown<T> T run(ResilientAction<T> action) throws java.lang.Exception
ResilientAction that will be run synchronously on the calling
thread. However, at the completion of the task, the result will be delivered to
the promise provided. And the provided callback will be executed.
If the ResilientAction throws a ActionTimeoutException, the result of
the action will be a timeout. Any other exception and the result of the action
will be an error.T - the type of the result of the actionaction - the action to runResilientPromise representing result of the actionRejectedActionException - if the action is rejectedjava.lang.ExceptionCopyright © 2014 Tim Brooks. All Rights Reserved.