Class FaultTolerance

    • Method Detail

      • config

        public static void config​(Config config)
        Configure Helidon wide defaults from a config instance.
        Parameters:
        config - config to read fault tolerance configuration
      • executor

        public static void executor​(Supplier<? extends ExecutorService> executor)
        Configure Helidon wide executor service for Fault Tolerance.
        Parameters:
        executor - executor service to use, such as for Async
      • scheduledExecutor

        public static void scheduledExecutor​(Supplier<? extends ScheduledExecutorService> executor)
        Configure Helidon wide scheduled executor service for Fault Tolerance.
        Parameters:
        executor - scheduled executor service to use, such as for Retry scheduling
      • initialized

        public static boolean initialized()
        Mostly used for testing. This class is considered to be initialized if any of its (lazy valued) executors were returned.
        Returns:
        boolean indicating whether init took place
      • builder

        public static FaultTolerance.Builder builder()
        A builder to configure a customized sequence of fault tolerance handlers.
        Returns:
        a new builder
      • typedBuilder

        public static <T> FaultTolerance.TypedBuilder<T> typedBuilder()
        A typed builder to configure a customized sequence of fault tolerance handlers.
        Type Parameters:
        T - type of result
        Returns:
        a new builder