netflix.ocelli.functions.Failures Maven / Gradle / Ivy
package netflix.ocelli.functions;
import netflix.ocelli.FailureDetectorFactory;
import rx.Observable;
public abstract class Failures {
public static FailureDetectorFactory never() {
return new FailureDetectorFactory() {
@Override
public Observable call(C client) {
return Observable.never();
}
};
}
public static FailureDetectorFactory always(final Throwable t) {
return new FailureDetectorFactory() {
@Override
public Observable call(C client) {
return Observable.error(t);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy