@API(status=STABLE)
public interface FaultClassifier
| Modifier and Type | Method and Description |
|---|---|
Throwable |
classify(Throwable throwable)
Classifies the given
throwable into transient and persistent faults. |
default <T> T |
classifyExceptionally(Throwable throwable)
Provides a function that classifies its argument using
classify(Throwable) and throws it. |
Throwable classify(Throwable throwable)
throwable into transient and persistent faults.throwable - the throwableTransientFaultException with the given
throwable as its cause, if it's considered transientdefault <T> T classifyExceptionally(Throwable throwable) throws Throwable
classify(Throwable) and throws it. This function
is supposed to be used in conjunction with CompletableFuture.exceptionally(Function).T - generic return typethrowable - the throwableThrowable - either argument or wrapped argumentCompletableFuture.exceptionally(Function)Copyright © 2015–2019 Zalando SE. All rights reserved.