R- result type
public interface Call<R>
cancelCallbackthat is registered. Useful for integrating with libraries that support cancellation.
To perform cancellable async executions, use the
FailsafeExecutor async methods.
|Modifier and Type||Method and Description|
Cancels a synchronous execution and calls the most recent
Executes the call until a successful result is returned or the configured policies are exceeded.
Returns whether the call has been cancelled.
FailsafeException- if the execution fails with a checked Exception.
Throwable.getCause()can be used to learn the underlying checked exception.
boolean cancel(boolean mayInterruptIfRunning)
cancelCallbackthat was registered. The execution is still allowed to complete and return a result. In addition to using a
cancelCallback, executions can cooperate with cancellation by checking
mayInterruptIfRunning- whether the execution should be interrupted
falseif the execution was already cancelled or completed.
Copyright © 2022. All rights reserved.