All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.kora.resilient.fallback.FallbackPredicate Maven / Gradle / Ivy

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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy