Interface HealthCheckService

    • Method Detail

      • performAsyncHealthCheck

        java.util.concurrent.CompletableFuture<Health> performAsyncHealthCheck​(Context context,
                                                                               java.util.function.Consumer<HealthCheck> onStartConsumer,
                                                                               java.util.function.BiConsumer<HealthCheck,​Response> onFinishConsumer,
                                                                               java.util.List<java.lang.String> tags)
        Performs various HealthChecks asynchronously and returns a CompletableFuture which contains the Health representing each HealthChecks Response. It is up to the implementator to respect timeouts and handle exceptions accordingly, when these situations arise when calling HealthCheck.perform(Context). Callback methods can be provided to print information before and after a HealthCheck is invoked. When providing a onFinishConsumer please note, that this is invoked even if the HealthCheck.perform(Context) execution failed or timed out and therefore may not represent the value when calling HealthCheck.perform(Context) directly.
        Parameters:
        context - The context object
        onStartConsumer - Callback method which is invoked before the HealthCheck.perform(Context) method is invoked. May be null.
        onFinishConsumer - Callback method which is invoked after the HealthCheck.perform(Context) method is invoked. May be null.
        Returns:
        The CompletableFuture to retrieve the Health from.