io.vertx.ext.web.handler.graphql.dataloader

## Interface VertxBatchLoader<K,V>

- All Superinterfaces:
    org.dataloader.BatchLoaderWithContext<K,V>

      public interface VertxBatchLoader<K,V>
      extends org.dataloader.BatchLoaderWithContext<K,V>

  A `BatchLoaderWithContext` that works well with Vert.x callback and `Future` based APIs.
  Author:
    Thomas Segismont

- - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> VertxBatchLoader<K,V>` | `create(java.util.function.BiFunction<List<K>,org.dataloader.BatchLoaderEnvironment,Future<List<V>>> batchLoader)` Create a new batch loader that works well with `Future` based APIs.
    `static <K,V> VertxBatchLoader<K,V>` | `create(java.util.function.BiFunction<List<K>,org.dataloader.BatchLoaderEnvironment,Future<List<V>>> batchLoader, java.util.function.Function<org.dataloader.BatchLoaderEnvironment,Context> contextProvider)` Like `create(BiFunction)`, except the method uses the provided `contextProvider` instead of capturing the current one.
    `static <K,V> VertxBatchLoader<K,V>` | `create(TriConsumer<List<K>,org.dataloader.BatchLoaderEnvironment,Promise<List<V>>> batchLoader)` Create a new batch loader that works well with callback based APIs.
    `static <K,V> VertxBatchLoader<K,V>` | `create(TriConsumer<List<K>,org.dataloader.BatchLoaderEnvironment,Promise<List<V>>> batchLoader, java.util.function.Function<org.dataloader.BatchLoaderEnvironment,Context> contextProvider)` Like `create(TriConsumer)`, except the method uses the provided `contextProvider` instead of capturing the current one.

    - ### Methods inherited from interface org.dataloader.BatchLoaderWithContext

      `load`

- - ### Method Detail

    - #### create

          static <K,V> VertxBatchLoader<K,V> create(TriConsumer<List<K>,org.dataloader.BatchLoaderEnvironment,Promise<List<V>>> batchLoader)

      Create a new batch loader that works well with callback based APIs.

      The provided `batchLoader` will be invoked with the following arguments:

      - the keys for the data objects that should be loaded
      - the `BatchLoaderEnvironment`
      - a `Promise` that the implementor must complete after the data objects are loaded

    - #### create

          static <K,V> VertxBatchLoader<K,V> create(TriConsumer<List<K>,org.dataloader.BatchLoaderEnvironment,Promise<List<V>>> batchLoader,
                                                    java.util.function.Function<org.dataloader.BatchLoaderEnvironment,Context> contextProvider)

      Like `create(TriConsumer)`, except the method uses the provided `contextProvider` instead of capturing the current one.

    - #### create

          static <K,V> VertxBatchLoader<K,V> create(java.util.function.BiFunction<List<K>,org.dataloader.BatchLoaderEnvironment,Future<List<V>>> batchLoader)

      Create a new batch loader that works well with `Future` based APIs.

      The provided `batchLoader` will be invoked with the following arguments:

      - the keys for the data objects that should be loaded
      - the `BatchLoaderEnvironment`

    - #### create

          static <K,V> VertxBatchLoader<K,V> create(java.util.function.BiFunction<List<K>,org.dataloader.BatchLoaderEnvironment,Future<List<V>>> batchLoader,
                                                    java.util.function.Function<org.dataloader.BatchLoaderEnvironment,Context> contextProvider)

      Like `create(BiFunction)`, except the method uses the provided `contextProvider` instead of capturing the current one.

Copyright © 2021 Eclipse. All rights reserved.