Class ComposableFuture<T>

    • Constructor Detail

      • ComposableFuture

        public ComposableFuture()
    • Method Detail

      • except

        public CompletableFuture<T> except​(Consumer<Throwable> consumer)
        Sets a consumer to be called when the future is failed.
        Parameters:
        consumer - The consumer to call.
        Returns:
        A new future.
      • exceptAsync

        public CompletableFuture<T> exceptAsync​(Consumer<Throwable> consumer)
        Sets a consumer to be called asynchronously when the future is failed.
        Parameters:
        consumer - The consumer to call.
        Returns:
        A new future.
      • exceptAsync

        public CompletableFuture<T> exceptAsync​(Consumer<Throwable> consumer,
                                                Executor executor)
        Sets a consumer to be called asynchronously when the future is failed.
        Parameters:
        consumer - The consumer to call.
        executor - The executor with which to call the consumer.
        Returns:
        A new future.