Package org.eclipse.microprofile.fault.tolerance.tck.retry.clientserver

# 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 Summary

Constructors
Constructor
Description
`RetryClientForMaxRetries()`

## Method Summary

Modifier and Type
Method
Description
`int`
`getRetryCounterForServiceA()`
`int`
`getRetryCounterForServiceB()`
`int`
`getRetryCounterForServiceC()`
`int`
`getRetryCountForConnectionService()`
`int`
`getRetryCountForWritingService()`
`Connection`
`serviceA()`
`void`
`serviceB()`
Max retries is configured to 90 but the max duration is 1 second with a default durationUnit of milliseconds.
`void`
`serviceC()`
Max retries is configured to 90 but the max duration is 1 second with a durationUnit of seconds specified.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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