Class RetryClientForMaxRetries

java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.retry.clientserver.RetryClientForMaxRetries

@RequestScoped public class RetryClientForMaxRetries extends Object
A client to demonstrate the maxRetries and max duration configuration
Author:
Emily Jiang
  • Constructor Details

    • RetryClientForMaxRetries

      public RetryClientForMaxRetries()
  • Method Details

    • serviceA

      @Retry(maxRetries=5) public Connection serviceA()
    • getRetryCountForConnectionService

      public int getRetryCountForConnectionService()
    • serviceB

      @Retry(maxRetries=90, maxDuration=1000L) public void serviceB()
      Max retries is configured to 90 but the max duration is 1 second with a default durationUnit of milliseconds. Once the duration is reached, no more retries should be performed.
    • serviceC

      @Retry(maxRetries=90, maxDuration=1L, durationUnit=SECONDS) public void serviceC()
      Max retries is configured to 90 but the max duration is 1 second with a durationUnit of seconds specified. Once the duration is reached, no more retries should be performed.
    • getRetryCountForWritingService

      public int getRetryCountForWritingService()
    • getRetryCounterForServiceA

      public int getRetryCounterForServiceA()
    • getRetryCounterForServiceB

      public int getRetryCounterForServiceB()
    • getRetryCounterForServiceC

      public int getRetryCounterForServiceC()