Package dev.failsafe
Class CallImpl<R>
- java.lang.Object
-
- dev.failsafe.CallImpl<R>
-
-
Field Summary
Fields Modifier and Type Field Description private SyncExecutionImpl<R>execution
-
Constructor Summary
Constructors Constructor Description CallImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)Cancels a synchronous execution and calls the most recentcancelCallbackthat was registered.Rexecute()Executes the call until a successful result is returned or the configured policies are exceeded.booleanisCancelled()Returns whether the call has been cancelled.(package private) voidsetExecution(SyncExecutionImpl<R> execution)
-
-
-
Field Detail
-
execution
private volatile SyncExecutionImpl<R> execution
-
-
Method Detail
-
setExecution
void setExecution(SyncExecutionImpl<R> execution)
-
execute
public R execute()
Description copied from interface:CallExecutes the call until a successful result is returned or the configured policies are exceeded.
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
Description copied from interface:CallCancels a synchronous execution and calls the most recentcancelCallbackthat was registered. The execution is still allowed to complete and return a result. In addition to using acancelCallback, executions can cooperate with cancellation by checkingExecutionContext.isCancelled().
-
isCancelled
public boolean isCancelled()
Description copied from interface:CallReturns whether the call has been cancelled.- Specified by:
isCancelledin interfaceCall<R>
-
-