Class Futures


  • public final class Futures
    extends Object

    Futures class.

    Version:
    $Id: $Id
    Author:
    Long Dinh
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T join​(io.vertx.core.Future<T> future)
      join.
      static <T> T join​(io.vertx.core.Future<T> future, long time, TimeUnit unit)
      join.
      static <T> T joinNow​(io.vertx.core.Future<T> future)
      joinNow.
      static <T,​V,​S,​R>
      R
      sync​(QuadConsumer<T,​V,​S,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg1, V arg2, S arg3)
      sync.
      static <T,​V,​R>
      R
      sync​(TriConsumer<T,​V,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg1, V arg2)
      sync.
      static <T,​R>
      R
      sync​(BiConsumer<T,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg)
      sync.
      static <R> R sync​(Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer)
      sync.
      static <T,​V,​U,​R>
      io.vertx.core.Future<R>
      toFuture​(QuadConsumer<T,​V,​U,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg1, V arg2, U arg3)
      toFuture.
      static <T,​V,​R>
      io.vertx.core.Future<R>
      toFuture​(TriConsumer<T,​V,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg1, V arg2)
      toFuture.
      static <T,​R>
      io.vertx.core.Future<R>
      toFuture​(BiConsumer<T,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer, T arg)
      toFuture.
      static <R> io.vertx.core.Future<R> toFuture​(Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer)
      toFuture.
    • Method Detail

      • toFuture

        public static <T,​V,​U,​R> io.vertx.core.Future<R> toFuture​(QuadConsumer<T,​V,​U,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                                                                   T arg1,
                                                                                   V arg2,
                                                                                   U arg3)

        toFuture.

        Type Parameters:
        T - a T object.
        V - a V object.
        U - a U object.
        R - a R object.
        Parameters:
        consumer - a QuadConsumer object.
        arg1 - a T object.
        arg2 - a V object.
        arg3 - a U object.
        Returns:
        a Future object.
      • toFuture

        public static <T,​V,​R> io.vertx.core.Future<R> toFuture​(TriConsumer<T,​V,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                                                           T arg1,
                                                                           V arg2)

        toFuture.

        Type Parameters:
        T - a T object.
        V - a V object.
        R - a R object.
        Parameters:
        consumer - a TriConsumer object.
        arg1 - a T object.
        arg2 - a V object.
        Returns:
        a Future object.
      • toFuture

        public static <T,​R> io.vertx.core.Future<R> toFuture​(BiConsumer<T,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                                                   T arg)

        toFuture.

        Type Parameters:
        T - a T object.
        R - a R object.
        Parameters:
        consumer - a BiConsumer object.
        arg - a T object.
        Returns:
        a Future object.
      • toFuture

        public static <R> io.vertx.core.Future<R> toFuture​(Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer)

        toFuture.

        Type Parameters:
        R - a R object.
        Parameters:
        consumer - a Consumer object.
        Returns:
        a Future object.
      • joinNow

        public static <T> T joinNow​(io.vertx.core.Future<T> future)

        joinNow.

        Type Parameters:
        T - a T object.
        Parameters:
        future - a Future object.
        Returns:
        a T object.
      • join

        public static <T> T join​(io.vertx.core.Future<T> future)

        join.

        Type Parameters:
        T - a T object.
        Parameters:
        future - a Future object.
        Returns:
        a T object.
      • join

        public static <T> T join​(io.vertx.core.Future<T> future,
                                 long time,
                                 TimeUnit unit)

        join.

        Type Parameters:
        T - a T object.
        Parameters:
        future - a Future object.
        time - a long.
        unit - a TimeUnit object.
        Returns:
        a T object.
      • sync

        public static <T,​V,​S,​R> R sync​(QuadConsumer<T,​V,​S,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                                         T arg1,
                                                         V arg2,
                                                         S arg3)

        sync.

        Type Parameters:
        T - a T object.
        V - a V object.
        S - a S object.
        R - a R object.
        Parameters:
        consumer - a QuadConsumer object.
        arg1 - a T object.
        arg2 - a V object.
        arg3 - a S object.
        Returns:
        a R object.
      • sync

        public static <T,​V,​R> R sync​(TriConsumer<T,​V,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                                 T arg1,
                                                 V arg2)

        sync.

        Type Parameters:
        T - a T object.
        V - a V object.
        R - a R object.
        Parameters:
        consumer - a TriConsumer object.
        arg1 - a T object.
        arg2 - a V object.
        Returns:
        a R object.
      • sync

        public static <T,​R> R sync​(BiConsumer<T,​io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer,
                                         T arg)

        sync.

        Type Parameters:
        T - a T object.
        R - a R object.
        Parameters:
        consumer - a BiConsumer object.
        arg - a T object.
        Returns:
        a R object.
      • sync

        public static <R> R sync​(Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<R>>> consumer)

        sync.

        Type Parameters:
        R - a R object.
        Parameters:
        consumer - a Consumer object.
        Returns:
        a R object.