netflix.ocelli.functions.Failures Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ocelli-core Show documentation
Show all versions of ocelli-core Show documentation
ocelli-core developed by Netflix
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