Class AsyncRetryClient
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.asyncretry.clientserver.AsyncRetryClient
A client to demonstrate the combination of the @Retry and @Asynchronous annotations.
- Author:
- Bruno Baptista
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int
int
int
int
int
int
serviceA()
Service will retry a method returning a CompletionStage and configured to always completeExceptionally.serviceBFailException
(CompletionStage future) Service will retry a method returning a CompletionStage and configured to always completeExceptionally.Service will retry a method returning a CompletionStage and configured to always completeExceptionally.serviceC()
Service will retry a method returning a CompletionStage and configured to completeExceptionally twice.serviceD()
Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally twice.serviceE()
Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally on all calls.serviceF()
Service will retry a method returning a parallel execution of 2 CompletionStages.serviceG()
Service will retry a method returning a parallel execution of 2 CompletionStages.serviceH()
Service will retry a method returning CompletionStages but throwing an exception.
-
Constructor Details
-
AsyncRetryClient
public AsyncRetryClient()
-
-
Method Details
-
serviceA
Service will retry a method returning a CompletionStage and configured to always completeExceptionally.- Returns:
- a
CompletionStage
-
serviceBFailExceptionally
@Retry(maxRetries=2) public CompletionStage<String> serviceBFailExceptionally(CompletionStage future) Service will retry a method returning a CompletionStage and configured to always completeExceptionally.- Returns:
- a
CompletionStage
-
serviceBFailException
Service will retry a method returning a CompletionStage and configured to always completeExceptionally.- Returns:
- a
CompletionStage
-
serviceC
Service will retry a method returning a CompletionStage and configured to completeExceptionally twice.- Returns:
- a
CompletionStage
-
serviceD
Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally twice.- Returns:
- a
CompletionStage
-
serviceE
Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally on all calls.- Returns:
- a
CompletionStage
-
serviceF
Service will retry a method returning a parallel execution of 2 CompletionStages. One of them configured to always fail.- Returns:
- a
CompletionStage
-
serviceG
Service will retry a method returning a parallel execution of 2 CompletionStages. One of them configured to fail twice.- Returns:
- a
CompletionStage
-
serviceH
Service will retry a method returning CompletionStages but throwing an exception. fail twice.- Returns:
- a
CompletionStage
-
getCountInvocationsServA
public int getCountInvocationsServA() -
getCountInvocationsServBFailException
public int getCountInvocationsServBFailException() -
getCountInvocationsServBFailExceptionally
public int getCountInvocationsServBFailExceptionally() -
getCountInvocationsServC
public int getCountInvocationsServC() -
getCountInvocationsServD
public int getCountInvocationsServD() -
getCountInvocationsServE
public int getCountInvocationsServE() -
getCountInvocationsServF
public int getCountInvocationsServF() -
getCountInvocationsServG
public int getCountInvocationsServG() -
getCountInvocationsServH
public int getCountInvocationsServH()
-