ru.tinkoff.kora.resilient.fallback.FallbackPredicate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resilient-kora Show documentation
Show all versions of resilient-kora Show documentation
Kora resilient-kora module
The newest version!
package ru.tinkoff.kora.resilient.fallback;
import jakarta.annotation.Nonnull;
import java.util.function.Predicate;
/**
* Configures behavior of Fallback on whenever exception should count as fallback applicable or not
*/
public interface FallbackPredicate extends Predicate {
/**
* @return name of the predicate
*/
@Nonnull
String name();
/**
* @param throwable to test
* @return when True than throwable is registered as failure
*/
@Override
boolean test(@Nonnull Throwable throwable);
}