io.vertx.ext.web.handler.graphql

## Class VertxBatchLoader<K,V>

- java.lang.Object
- - io.vertx.ext.web.handler.graphql.VertxBatchLoader<K,V>

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

      public class VertxBatchLoader<K,V>
      extends Object
      implements org.dataloader.BatchLoaderWithContext<K,V>

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VertxBatchLoader(TriConsumer<List<K>,org.dataloader.BatchLoaderEnvironment,Promise<List<V>>> batchLoader)` Create a new batch loader.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompletionStage<List<V>>` | `load(List<K> keys, org.dataloader.BatchLoaderEnvironment environment)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VertxBatchLoader

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

      Create a new batch loader. The provided function will be invoked with the following arguments:
      - the keys for the data objects that should be loaded
      - the `BatchLoaderEnvironment`
      - a future that the implementor must complete after the data objects are loaded

  - ### Method Detail

    - #### load

          public CompletionStage<List<V>> load(List<K> keys,
                                               org.dataloader.BatchLoaderEnvironment environment)

      Specified by:
        `load` in interface `org.dataloader.BatchLoaderWithContext<K,V>`

Copyright © 2022 Eclipse. All rights reserved.