Package io.hekate.messaging.retry
Interface FailedAttempt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Throwable
error()
Returns the cause of ths failure.default boolean
isCausedBy(Class<? extends Throwable> type)
Returnstrue
if this failure is caused by an error of the specified type.default <T extends Throwable>
booleanisCausedBy(Class<T> type, Predicate<T> predicate)
Returnstrue
if this failure is caused by an error of the specified type.RetryRoutingPolicy
routing()
Returns the routing policy.-
Methods inherited from interface io.hekate.messaging.retry.Attempt
allTriedNodes, attempt, hasTriedNode, isFirstAttempt, lastTriedNode
-
-
-
-
Method Detail
-
routing
RetryRoutingPolicy routing()
Returns the routing policy.- Returns:
- Routing policy.
-
error
Throwable error()
Returns the cause of ths failure.- Returns:
- Cause of this failure.
-
isCausedBy
default boolean isCausedBy(Class<? extends Throwable> type)
Returnstrue
if this failure is caused by an error of the specified type.- Parameters:
type
- Error type.- Returns:
true
if this failure is caused by an error of the specified type.
-
isCausedBy
default <T extends Throwable> boolean isCausedBy(Class<T> type, Predicate<T> predicate)
Returnstrue
if this failure is caused by an error of the specified type.- Type Parameters:
T
- Error type.- Parameters:
type
- Error type.predicate
- Error predicate.- Returns:
true
if this failure is caused by an error of the specified type.
-
-