public final class RetryContext extends Object
Constructor and Description |
---|
RetryContext() |
Modifier and Type | Method and Description |
---|---|
void |
addExplicitFailure(Throwable failure)
Indicates to a naming provider that this exception should be thrown, as
opposed to a "no more destinations" summary exception, if no other
destinations are successful during the invocation.
|
void |
addFailure(Throwable failure)
Register an exception that was observed while attempting to execute an
operation against a destination.
|
void |
addTransientFail(URI destination)
Registers a destination as having transiently failed.
|
URI |
currentDestination()
Gets the current destination being attempted by the invocation.
|
List<Throwable> |
getFailures()
Gets a list of exceptions for failures that have occurred while retrying
this invocation.
|
boolean |
hasExplicitFailure()
Returns true if an explicit failure has been registered.
|
boolean |
hasTransientlyFailed(URI destination)
Indicates whether the specified destination has been registered as
failing as part of this invocation.
|
void |
setCurrentDestination(URI destination)
Sets the current destination being attempted by the invocation.
|
int |
transientFailCount()
Return the current number of transient failures that have been registered
against this context.
|
public void setCurrentDestination(URI destination)
destination
- the current destinationpublic URI currentDestination()
public boolean hasTransientlyFailed(URI destination)
destination
- the destination to checkpublic void addTransientFail(URI destination)
destination
- the destination to record a transient failurepublic int transientFailCount()
public List<Throwable> getFailures()
public void addExplicitFailure(Throwable failure)
failure
- the Throwable that should be thrown if no other
destinations succeed.public boolean hasExplicitFailure()
addExplicitFailure(Throwable)
.public void addFailure(Throwable failure)
failure
- the throwable thrown during a destination attemptCopyright © 2021 JBoss by Red Hat. All rights reserved.