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

io.smallrye.faulttolerance.mutiny.api.MutinyFaultTolerance Maven / Gradle / Ivy

There is a newer version: 6.7.3
Show newest version
package io.smallrye.faulttolerance.mutiny.api;

import java.util.concurrent.Callable;
import java.util.function.Function;
import java.util.function.Supplier;

import io.smallrye.faulttolerance.api.FaultTolerance;
import io.smallrye.faulttolerance.api.SpiAccess;
import io.smallrye.mutiny.Uni;

/**
 * @deprecated use {@link io.smallrye.faulttolerance.api.Guard} or {@link io.smallrye.faulttolerance.api.TypedGuard}
 */
@Deprecated(forRemoval = true)
public interface MutinyFaultTolerance {
    @Deprecated(forRemoval = true)
    static  FaultTolerance.Builder, Callable>> createCallable(Callable> action) {
        return SpiAccess.get().newAsyncBuilder(Uni.class, ft -> ft.adaptCallable(action));
    }

    @Deprecated(forRemoval = true)
    static  FaultTolerance.Builder, Supplier>> createSupplier(Supplier> action) {
        return SpiAccess.get().newAsyncBuilder(Uni.class, ft -> ft.adaptSupplier(action));
    }

    @Deprecated(forRemoval = true)
    static  FaultTolerance.Builder, FaultTolerance>> create() {
        return SpiAccess.get().newAsyncBuilder(Uni.class, Function.identity());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy