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

com.github.phantomthief.failover.SimpleFailover Maven / Gradle / Ivy

There is a newer version: 0.1.32
Show newest version
package com.github.phantomthief.failover;

import java.util.Collection;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * @author huangli
 * Created on 2020-01-15
 */
public interface SimpleFailover {
    default void success(@Nonnull T object) {
        // default behavior: do nothing
    }

    void fail(@Nonnull T object);

    void down(@Nonnull T object);

    @Nullable
    T getOneAvailable();

    @Nullable
    T getOneAvailableExclude(Collection exclusions);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy