@RequestScoped public class DisableClient extends Object
Constructor and Description |
---|
DisableClient() |
Modifier and Type | Method and Description |
---|---|
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.
|
@Retry(maxRetries=1) public Connection serviceA()
@Retry(maxRetries=1) @Fallback(value=StringFallbackHandler.class) public String serviceB()
@CircuitBreaker(successThreshold=2, requestVolumeThreshold=4, failureRatio=0.75, delay=50000L) public Connection serviceC()
@Timeout public Connection serviceD(long timeToSleep)
timeToSleep
- How long should the execution take in millispublic int getRetryCountForConnectionService()
public int getCounterForInvokingServiceB()
public int getCounterForInvokingServiceC()
Copyright © 2016 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.