Class ProviderUtil
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.provider.support.ProviderUtil
Convenient helper for common functionality with providers.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T> reactor.core.publisher.Mono<T>applyTimeoutAndRetryIfApplicable(reactor.core.publisher.Mono<T> mono, ProviderProperties properties, Consumer<reactor.util.retry.Retry.RetrySignal> doBeforeRetry) AppliesMono.timeout(Duration)andMono.retryWhen(Retry)if applicable.
- 
Constructor Details- 
ProviderUtilpublic ProviderUtil()
 
- 
- 
Method Details- 
applyTimeoutAndRetryIfApplicablepublic <T> reactor.core.publisher.Mono<T> applyTimeoutAndRetryIfApplicable(reactor.core.publisher.Mono<T> mono, ProviderProperties properties, @Nullable Consumer<reactor.util.retry.Retry.RetrySignal> doBeforeRetry) AppliesMono.timeout(Duration)andMono.retryWhen(Retry)if applicable. Otherwise, returns the given mono.- Type Parameters:
- T- the type of the value in the mono
- Parameters:
- mono- the mono on which to apply a timeout
- properties- provider properties from which to source timeout and retry configuration
- doBeforeRetry- (optional) a function to supply to- RetryBackoffSpec.doBeforeRetry(Consumer)
- Returns:
- the mono after applying the configuration if applicable, else the input mono
 
 
-