public RetryImpl(String name, RetryConfig config){ this.name = name; this.config = config; this.maxAttempts = config.getMaxAttempts(); this.intervalFunction = config.getIntervalFunction(); this.exceptionPredicate = config.getExceptionPredicate(); this.resultPredicate = config.getResultPredicate(); this.metrics = this.new RetryMetrics(); this.eventProcessor = new RetryEventProcessor(); succeededAfterRetryCounter = new LongAdder(); failedAfterRetryCounter = new LongAdder(); succeededWithoutRetryCounter = new LongAdder(); failedWithoutRetryCounter = new LongAdder(); }
public AsyncRetryImpl(String name, RetryConfig config) { this.config = config; this.name = name; this.maxAttempts = config.getMaxAttempts(); this.intervalFunction = config.getIntervalFunction(); this.exceptionPredicate = config.getExceptionPredicate(); this.resultPredicate = config.getResultPredicate(); this.metrics = this.new AsyncRetryMetrics(); succeededAfterRetryCounter = new LongAdder(); failedAfterRetryCounter = new LongAdder(); succeededWithoutRetryCounter = new LongAdder(); failedWithoutRetryCounter = new LongAdder(); this.eventProcessor = new RetryEventProcessor(); }