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

ru.tinkoff.kora.resilient.circuitbreaker.CircuitBreakerPredicate Maven / Gradle / Ivy

The newest version!
package ru.tinkoff.kora.resilient.circuitbreaker;


import jakarta.annotation.Nonnull;

import java.util.function.Predicate;

/**
 * Configures behavior of {@link CircuitBreaker#releaseOnError(Throwable)} on whenever exception should count as failre or not
 */
public interface CircuitBreakerPredicate 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