public RetryInterceptorBuilder < T > backOffOptions ( long initialInterval , double multiplier , long maxInterval ) { Assert . isNull ( this . retryOperations , "cannot set the back off policy when a custom retryOperations has been set" ) ; Assert . isTrue ( ! this . backOffPolicySet , "cannot set the back off options when a back off policy has been set" ) ; ExponentialBackOffPolicy policy = new ExponentialBackOffPolicy ( ) ; policy . setInitialInterval ( initialInterval ) ; policy . setMultiplier ( multiplier ) ; policy . setMaxInterval ( maxInterval ) ; this . retryTemplate . setBackOffPolicy ( policy ) ; this . backOffOptionsSet = true ; this . templateAltered = true ; return this ; }
Apply the backoff options . Cannot be used if a custom retry operations or back off policy has been set .