public interface BatchLoaderWithContext<K,V>
BatchLoader is given a BatchLoaderEnvironment object
that encapsulates the calling context. A typical use case is passing in security credentials or database connection details
say.
See BatchLoader for more details on the design invariants that you must implement in order to
use this interface.| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<java.util.List<V>> |
load(java.util.List<K> keys,
BatchLoaderEnvironment environment)
Called to batch load the provided keys and return a promise to a list of values.
|
java.util.concurrent.CompletionStage<java.util.List<V>> load(java.util.List<K> keys, BatchLoaderEnvironment environment)
keys - the collection of keys to loadenvironment - an environment object that can help with the call