Package com.oracle.bmc.retrier
Class BmcGenericRetrier
- java.lang.Object
- 
- com.oracle.bmc.retrier.BmcGenericRetrier
 
- 
- Direct Known Subclasses:
- TokenRefreshRetrier
 
 public class BmcGenericRetrier extends Object A generic retrier that can be used to implement custom retry behavior for specific types of calls.
- 
- 
Constructor SummaryConstructors Constructor Description BmcGenericRetrier(RetryConfiguration retryConfiguration)Creates a new retrier with the given configuration.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <REQUEST,RESPONSE>
 RESPONSEdoFunctionCall(REQUEST request, Function<REQUEST,RESPONSE> functionCall)Executes the actual function call.protected <REQUEST,RESPONSE>
 CompletionStage<RESPONSE>doFunctionCallAsync(REQUEST request, Function<REQUEST,CompletionStage<RESPONSE>> functionCall)<REQUEST,RESPONSE>
 RESPONSEexecute(REQUEST requestToUse, Function<REQUEST,RESPONSE> functionCall)Executes the functionCall based upon theRetryConfigurationof this retrier<REQUEST,RESPONSE>
 CompletionStage<RESPONSE>executeAsync(WaiterScheduler runner, REQUEST requestToUse, Function<REQUEST,CompletionStage<RESPONSE>> functionCall)RetryConditiongetRetryCondition()GenericWaitergetWaiter()
 
- 
- 
- 
Constructor Detail- 
BmcGenericRetrierpublic BmcGenericRetrier(@Nonnull RetryConfiguration retryConfiguration)Creates a new retrier with the given configuration.- Parameters:
- retryConfiguration- The retry configuration to use.
 
 
- 
 - 
Method Detail- 
executepublic <REQUEST,RESPONSE> RESPONSE execute(@Nonnull REQUEST requestToUse, @Nonnull Function<REQUEST,RESPONSE> functionCall)Executes the functionCall based upon theRetryConfigurationof this retrier- Type Parameters:
- REQUEST- Request object class
- RESPONSE- Response object class
- Parameters:
- requestToUse- The request that is passed to the functionCall
- functionCall- Function that will be invoked to send out the request.
- Returns:
- The successful response
 
 - 
executeAsyncpublic final <REQUEST,RESPONSE> CompletionStage<RESPONSE> executeAsync(WaiterScheduler runner, @Nonnull REQUEST requestToUse, @Nonnull Function<REQUEST,CompletionStage<RESPONSE>> functionCall) 
 - 
doFunctionCallprotected <REQUEST,RESPONSE> RESPONSE doFunctionCall(@Nonnull REQUEST request, @Nonnull Function<REQUEST,RESPONSE> functionCall)Executes the actual function call.Can be overridden, e.g. for debugging. - Type Parameters:
- REQUEST- Request object class
- RESPONSE- Response object class
- Parameters:
- functionCall- Function that will be invoked to send out the request.
- request- request data for the function call
- Returns:
- The successful response
 
 - 
doFunctionCallAsyncprotected <REQUEST,RESPONSE> CompletionStage<RESPONSE> doFunctionCallAsync(@Nullable @Nonnull REQUEST request, @Nonnull Function<REQUEST,CompletionStage<RESPONSE>> functionCall) 
 - 
getWaiterpublic GenericWaiter getWaiter() 
 - 
getRetryConditionpublic RetryCondition getRetryCondition() 
 
- 
 
-