public interface SubmissionService extends Service
MAX_CONCURRENCY_LEVEL, MAX_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
<T> ResilientFuture<T> |
submit(ResilientAction<T> action,
long millisTimeout)
Submits a
ResilientAction that will be run asynchronously. |
<T> ResilientFuture<T> |
submit(ResilientAction<T> action,
ResilientCallback<T> callback,
long millisTimeout)
Submits a
ResilientAction that will be run asynchronously similar to
submit(ResilientAction, long). |
getActionMetrics, getCircuitBreaker, shutdown<T> ResilientFuture<T> submit(ResilientAction<T> action, long millisTimeout)
ResilientAction that will be run asynchronously.
The result of the action will be delivered to the future returned
by this call. An attempt to cancel the action will be made if it
does not complete before the timeout.T - the type of the result of the actionaction - the action to submitmillisTimeout - milliseconds before the action times outResilientFuture representing pending completion of the actionRejectedActionException - if the action is rejected<T> ResilientFuture<T> submit(ResilientAction<T> action, ResilientCallback<T> callback, long millisTimeout)
ResilientAction that will be run asynchronously similar to
submit(ResilientAction, long). However, at the completion of the task,
the provided callback will be executed. The callback will be run regardless of the result
of the action.T - the type of the result of the actionaction - the action to submitcallback - to run on action completionmillisTimeout - milliseconds before the action times outResilientFuture representing pending completion of the actionRejectedActionException - if the action is rejectedCopyright © 2014 Tim Brooks. All Rights Reserved.