C - the context passed to an pattern actionpublic interface SubmissionPattern<C>
ResilientPatternAction opposed to ResilientAction.
The ResilientPatternAction run method is passed a context
specific to the service on which it is run.| Modifier and Type | Method and Description |
|---|---|
<T> ResilientFuture<T> |
submit(ResilientPatternAction<T,C> action,
long millisTimeout)
Submits a
ResilientPatternAction that will be run asynchronously. |
<T> ResilientFuture<T> |
submit(ResilientPatternAction<T,C> action,
ResilientCallback<T> callback,
long millisTimeout)
Submits a
ResilientPatternAction that will be run asynchronously similar to
submit(ResilientPatternAction, long). |
<T> ResilientFuture<T> submit(ResilientPatternAction<T,C> action, long millisTimeout)
ResilientPatternAction 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(ResilientPatternAction<T,C> action, ResilientCallback<T> callback, long millisTimeout)
ResilientPatternAction that will be run asynchronously similar to
submit(ResilientPatternAction, 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.