@RequestScoped public class RetryMetricBean extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RetryMetricBean.CallCounter |
static class |
RetryMetricBean.NonRetryableException |
Constructor and Description |
---|
RetryMetricBean() |
Modifier and Type | Method and Description |
---|---|
void |
failAfterDelay(Duration delay) |
void |
failSeveralTimes(int timesToFail,
RetryMetricBean.CallCounter counter) |
void |
failSeveralTimesThenNonRetryable(int timesToFail,
RetryMetricBean.CallCounter counter) |
void |
maxRetriesZero() |
@Retry(maxRetries=5) public void failSeveralTimes(int timesToFail, RetryMetricBean.CallCounter counter)
@Retry(maxRetries=-1, maxDuration=1000L, delay=0L, jitter=0L) public void failAfterDelay(Duration delay) throws InterruptedException
InterruptedException
@Retry(maxRetries=5, abortOn=RetryMetricBean.NonRetryableException.class) public void failSeveralTimesThenNonRetryable(int timesToFail, RetryMetricBean.CallCounter counter)
@Retry(maxRetries=0) public void maxRetriesZero()
Copyright © 2020 Eclipse Foundation. All rights reserved.