Class RetryClassLevelClientForMaxRetries

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

@RequestScoped @Retry(maxRetries=2) public class RetryClassLevelClientForMaxRetries extends Object
A client to demonstrate the maxRetries and max duration configuration
Author:
Emily Jiang
  • Constructor Details

    • RetryClassLevelClientForMaxRetries

      public RetryClassLevelClientForMaxRetries()
  • Method Details

    • serviceA

      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()