org.eclipse.microprofile.fault.tolerance.tck.disableEnv

## Class DisableClient

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.disableEnv.DisableClient

    @RequestScoped
    public class DisableClient
    extends Object

A client to determine the impact of the MP_Fault_Tolerance_NonFallback_Enabled environment variable

Author:
  Neil Young

### Constructor Summary

Constructors
Constructor and Description
`DisableClient()`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getCounterForInvokingServiceB()`
`int` `getCounterForInvokingServiceC()`
`int` `getRetryCountForConnectionService()`
`Connection` `serviceA()` Invokes connection service and increases the counter for invocations the connection service
`String` `serviceB()` Invokes name service and increases the counter for invocations of serviceB
`Connection` `serviceC()` Invokes connection service and increases the counter for invocations of serviceC and connection service
`Connection` `serviceD(long timeToSleep)` serviceD uses the default Fault Tolerance timeout of 1 second.

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

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

### Constructor Detail

#### DisableClient

    public DisableClient()

### Method Detail

#### serviceA

    @Retry(maxRetries=1)
    public Connection serviceA()

Invokes connection service and increases the counter for invocations the connection service

Returns:
  Always throws exception

#### serviceB

    @Retry(maxRetries=1)
     @Fallback(value=StringFallbackHandler.class)
    public String serviceB()

Invokes name service and increases the counter for invocations of serviceB

Returns:
  Always throws exception

#### serviceC

    @CircuitBreaker(successThreshold=2,
                    requestVolumeThreshold=4,
                    failureRatio=0.75,
                    delay=50000L)
    public Connection serviceC()

Invokes connection service and increases the counter for invocations of serviceC and connection service

Returns:
  Always throws exception

#### serviceD

    @Timeout
    public Connection serviceD(long timeToSleep)

serviceD uses the default Fault Tolerance timeout of 1 second.

Parameters:
  `timeToSleep` - How long should the execution take in millis
Returns:
  null or exception is raised

#### getRetryCountForConnectionService

    public int getRetryCountForConnectionService()

#### getCounterForInvokingServiceB

    public int getCounterForInvokingServiceB()

#### getCounterForInvokingServiceC

    public int getCounterForInvokingServiceC()