use of com.facebook.presto.failureDetector.FailureDetector in project presto by prestodb.
the class ServerMainModule method bindFailureDetector.
private static void bindFailureDetector(Binder binder, boolean coordinator) {
// TODO: this is a hack until the coordinator module works correctly
if (coordinator) {
binder.install(new FailureDetectorModule());
jaxrsBinder(binder).bind(NodeResource.class);
} else {
binder.bind(FailureDetector.class).toInstance(new FailureDetector() {
@Override
public Set<ServiceDescriptor> getFailed() {
return ImmutableSet.of();
}
});
}
}
Aggregations