@Test void testSend() throws IOException { ExponentialBackOffRetryStrategy.Config retryStrategyConfig = new ExponentialBackOffRetryStrategy.Config(); retryStrategyConfig.setMaxRetryCount(3); RetryableSender.Config senderConfig = new RetryableSender.Config(); RetryableSender sender = new RetryableSender(senderConfig, new FailurableSender(3), new ExponentialBackOffRetryStrategy(retryStrategyConfig)); FailurableSender baseSender = (FailurableSender) sender.getBaseSender(); assertThat(baseSender.getRetry(), is(0)); sender.send(ByteBuffer.allocate(64)); assertThat(baseSender.getRetry(), is(3)); }
public FluentdSender getBaseSender() { return baseSender; }
RetryableSender extends FluentdSender { public FluentdSender getBaseSender() { return baseSender; } }
RetryableSender extends FluentdSender { public FluentdSender getBaseSender() { return baseSender; } RetryableSender(FluentdSender baseSender, RetryStrategy retryStrategy);  RetryableSender(Config config, FluentdSender baseSender, RetryStrategy retryStrategy); }
RetryableSender extends FluentdSender { public FluentdSender getBaseSender() { return baseSender; } RetryableSender(FluentdSender baseSender, RetryStrategy retryStrategy);  RetryableSender(Config config, FluentdSender baseSender, RetryStrategy retryStrategy); @Override void close(); @Override boolean isAvailable(); FluentdSender getBaseSender(); RetryStrategy getRetryStrategy(); boolean isClosed(); @Override String toString(); }
RetryableSender extends FluentdSender { public FluentdSender getBaseSender() { return baseSender; } RetryableSender(FluentdSender baseSender, RetryStrategy retryStrategy);  RetryableSender(Config config, FluentdSender baseSender, RetryStrategy retryStrategy); @Override void close(); @Override boolean isAvailable(); FluentdSender getBaseSender(); RetryStrategy getRetryStrategy(); boolean isClosed(); @Override String toString();  }