public interface CompletionService extends Service
MAX_CONCURRENCY_LEVEL, MAX_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
<T> void |
submitAndComplete(ResilientAction<T> action,
ResilientPromise<T> promise,
long millisTimeout)
Submits a
ResilientAction that will be run asynchronously. |
<T> void |
submitAndComplete(ResilientAction<T> action,
ResilientPromise<T> promise,
ResilientCallback<T> callback,
long millisTimeout)
Submits a
ResilientAction that will be run asynchronously. |
getActionMetrics, getCircuitBreaker, shutdown<T> void submitAndComplete(ResilientAction<T> action, ResilientPromise<T> promise, long millisTimeout)
ResilientAction that will be run asynchronously. At the
completion of the task, the result will be delivered to the promise provided.T - the type of the result of the actionaction - the action to submitpromise - a promise to which deliver the resultmillisTimeout - milliseconds before the action times outRejectedActionException - if the action is rejected<T> void submitAndComplete(ResilientAction<T> action, ResilientPromise<T> promise, ResilientCallback<T> callback, long millisTimeout)
ResilientAction that will be run asynchronously. At the completion
of the task, the result will be delivered to the promise provided. And the provided
callback will be executed.T - the type of the result of the actionaction - the action to submitpromise - a promise to which deliver the resultcallback - to run on action completionmillisTimeout - milliseconds before the action times outRejectedActionException - if the action is rejectedCopyright © 2014 Tim Brooks. All Rights Reserved.